回答編集履歴
3
最初にマイナス判定を入れました
test
CHANGED
@@ -6,19 +6,19 @@
|
|
6
6
|
|
7
7
|
n = int(input("Enter a number :"))
|
8
8
|
|
9
|
-
if n
|
9
|
+
if n < -1:
|
10
10
|
|
11
|
-
|
11
|
+
break
|
12
12
|
|
13
|
-
|
13
|
+
elif n == num:
|
14
14
|
|
15
|
-
|
15
|
+
print("**REPEAT**")
|
16
16
|
|
17
|
-
|
17
|
+
num = n
|
18
18
|
|
19
19
|
else:
|
20
20
|
|
21
|
-
|
21
|
+
num = n
|
22
22
|
|
23
23
|
```
|
24
24
|
|
2
0 -> -1
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
-
num =
|
3
|
+
num = -1
|
4
4
|
|
5
5
|
while(True):
|
6
6
|
|
1
None -> 0
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
-
num =
|
3
|
+
num = 0
|
4
4
|
|
5
5
|
while(True):
|
6
6
|
|