Submission #3050574


Source Code Expand

N = int(input())
list = input().split()

num_list = []
for c in list:
    n = int(c)
    num_list.append(n)

state = True

i = 0

while state:
    for n in num_list:
        if n % 2:
            state = False
        else:
            n /= 2
    if state:
        i += 1

print(i)

Submission Info

Submission Time
Task B - Shift only
User hogeandfuga
Language Ruby (2.3.3)
Score 0
Code Size 304 Byte
Status RE
Exec Time 7 ms
Memory 1788 KB

Compile Error

./Main.rb:5: syntax error, unexpected ':', expecting keyword_do_cond or ';' or '\n'
for c in list:
              ^
./Main.rb:13: syntax error, unexpected ':', expecting keyword_do_cond or ';' or '\n'
while state:
            ^
./Main.rb:14: syntax error, unexpected ':', expecting keyword_do_cond or ';' or '\n'
    for n in num_list:
                      ^
./Main.rb:15: syntax error, unexpected ':', expecting keyword_then or ';' or '\n'
        if n % 2:
                 ^
./Main.rb:11: warning: assigned but unused variable - i
./Main.rb:17: syntax error, unexpected keyword_else, expecting end-of-input
        else:
            ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
RE × 3
RE × 13
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt RE 7 ms 1788 KB
2.txt RE 7 ms 1788 KB
3.txt RE 7 ms 1788 KB
4.txt RE 7 ms 1788 KB
5.txt RE 7 ms 1788 KB
6.txt RE 7 ms 1788 KB
7.txt RE 6 ms 1788 KB
sample1.txt RE 7 ms 1788 KB
sample2.txt RE 7 ms 1788 KB
sample3.txt RE 6 ms 1788 KB