配列に入れるのに苦労した。
※配列の入れ方は注意
p = []
#1の位置
sum_pin = 0
#1じゃない残り
ans = 0
for i in range(4):
p += input().split()
for i in range(10):
if p[i] == "1":
ans += 1
sum_pin = 10 - i
print(sum_pin)
print(ans)
Go to list of users who liked
配列に入れるのに苦労した。
※配列の入れ方は注意
p = []
#1の位置
sum_pin = 0
#1じゃない残り
ans = 0
for i in range(4):
p += input().split()
for i in range(10):
if p[i] == "1":
ans += 1
sum_pin = 10 - i
print(sum_pin)
print(ans)
Register as a new user and use Qiita more conveniently
Go to list of users who liked