【Day8】AtCoder Practice

AtCoder PracticeをPython3で解いてみる

Welcome to AtCoder

a = int(input())
bc = input().split()
b = int(bc[0])
c = int(bc[1])
s = input()
print("{} {}".format(a+b+c, s))

Product

ab = input().split()
product = int(ab[0]) * int(ab[1])
if (product % 2 == 0):
 print("Even")
else:
 print("Odd")

Placing Marbles

i_input = input()
count = 0
for i in i_input:
  if ( i == '1' ):
    count = count + 1
print(count)

Shift only

次回へ

コメント

タイトルとURLをコピーしました