0
0

ボウリング Python3編

Posted at

配列に入れるのに苦労した。
※配列の入れ方は注意

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)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0