Problem:


Score : 100 points

Problem Statement

Snuke has a grid consisting of three squares numbered 1, 2 and 3.
In each square, either 0 or 1 is written. The number written in Square i is s_i.

Snuke will place a marble on each square that says 1.
Find the number of squares on which Snuke will place a marble.

Constraints

Each of s_1, s_2 and s_3 is either 1 or 0.

Input

Input is given from Standard Input in the following format:

s_{1}s_{2}s_{3}

Output

Print the answer.

Sample Input 1

101

Sample Output 1

2

A marble will be placed on Square 1 and 3.

Sample Input 2

000

Sample Output 2

0

No marble will be placed on any square.



Sample input:
101


Sample output:
2

Submission status: Accepted

Solution code:
# coding: utf-8

s = input().rstrip()
result = s.count('1')
print(result)

Submission status: Accepted

Solution code:
s=input()
N=0
for i in s:
  N+=int(i)
print(N)

Submission status: Accepted

Solution code:
#入力を得る
n = input()
#リスト化する
lis = list(n)

count = 0

for i in range(len(n)):
    if lis[i]=='1':
        count +=1
print(count)

Submission status: Accepted

Solution code:
a = input()
print(int(a[0])+int(a[1])+int(a[2]))

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for _ in range(3):
    if n%10 == 1:
        ans+=1
    n=n//10
print(ans)

Submission status: Accepted

Solution code:
s=input()
c=0
if (s[0]=="1"):
  c+=1
if (s[1]=="1"):
  c+=1
if (s[2]=="1"):
  c+=1
print(c)

Submission status: Accepted

Solution code:
data = map(int,input())


print(sum(data))

Submission status: Accepted

Solution code:
ans = 0
l = input()
for i in range(len(l)):
  ans += int(l[i])
print(ans)

Submission status: Accepted

Solution code:
l = list(input())
l_new = [int(n) for n in l]
count = 0
for i in l_new:
    if i == 1:
        count += 1
print(count)

Submission status: Accepted

Solution code:
a=[int(x) for x in input()]
print(sum(a))

Submission status: Accepted

Solution code:
s = input()
x = s.count('1')

print(x)

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
## dp ##
INIT_VAL = 0
def DD2(d1,d2): return [[INIT_VAL]*d2 for _ in range(d1)]
def DD3(d1,d2,d3): return [DD2(d2,d3) for _ in range(d1)]
## math ##
def to_bin(x: int) -> str: return format(x, 'b') # rev => int(res, 2)
def to_oct(x: int) -> str: return format(x, 'o') # rev => int(res, 8)
def to_hex(x: int) -> str: return format(x, 'x') # rev => int(res, 16)
MOD=10**9+7
def divc(x,y) -> int: return -(-x//y)
def divf(x,y) -> int: return x//y
def gcd(x,y):
    while y: x,y = y,x%y
    return x
def lcm(x,y): return x*y//gcd(x,y)
def enumerate_divs(n):
    """Return a tuple list of divisor of n"""
    return [(i,n//i) for i in range(1,int(n**0.5)+1) if n%i==0]
def get_primes(MAX_NUM=10**3):
    """Return a list of prime numbers n or less"""
    is_prime = [True]*(MAX_NUM+1)
    is_prime[0] = is_prime[1] = False
    for i in range(2, int(MAX_NUM**0.5)+1):
        if not is_prime[i]: continue
        for j in range(i*2, MAX_NUM+1, i):
            is_prime[j] = False
    return [i for i in range(MAX_NUM+1) if is_prime[i]]
## libs ##
from itertools import accumulate as acc
from collections import deque, Counter
from heapq import heapify, heappop, heappush
from bisect import bisect_left

#======================================================#

def main():
    s = Counter(IS())
    print(s['1'])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
ans = 0
for i in range(len(n)):
  if n[i] == '1':
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

s = input()
print(s.count("1"))

Submission status: Accepted

Solution code:
s = input()

print(int(s[0])+int(s[1])+int(s[2]))

Submission status: Accepted

Solution code:
li = list(input()) #s=['a','b','c']
ans = li.count('1')
print(ans)

Submission status: Accepted

Solution code:
s = input()
count = 0

for i in s:
    if i=='1':
        count += 1

print(count)

Submission status: Accepted

Solution code:
number = input()
print(number.count('1'))

Submission status: Accepted

Solution code:
s_str = str(input())
s = [int(i) for i in s_str]
print(sum(s))

Submission status: Accepted

Solution code:
s = input()
ct = 0
for i in range(len(s)):
    if s[i] == '1':
        ct += 1
print(ct)

Submission status: Accepted

Solution code:
s=input()
c=0
for i in range(0,3):
  if s[i]=="1":
    c+=1
    
print(c)

Submission status: Accepted

Solution code:
def resolve():
    # 整数 1 つ
    n = str(input())
    # 整数複数個
    # a, b, c = list(map(int, input().split()))
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    print(n.count(str(1)))


resolve()

Submission status: Accepted

Solution code:
x = int(input())
i = 0
if x//100 == 1:
    i = i + 1
    x = x - 100
    if x//10 ==1:
        i = i + 1
        x = x - 10
        if x == 1:
            i = i + 1
    else:
        if x == 1:
            i = i + 1
else:
    if x//10 == 1:
        i = i + 1
        x = x - 10
        if x == 1:
            i = i + 1
    else:
        if x == 1:
            i = i + 1     

print(i)

Submission status: Accepted

Solution code:
line = list(input())
l = [int(s) for s in line]
a = sum(l)

print(a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 整数の入力
s = int(input())
t = str(s)
print(t.count('1'))

Submission status: Accepted

Solution code:
a = int(input())
ans = a%10 + (int(a/10))%10 + int(a/100)%10
print(ans)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in s:
  if i == '1':
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N=input()
print(int(N[0])+int(N[1])+int(N[2]))

Submission status: Accepted

Solution code:
num=input()
a=0
 
if int(num[0])==1:
  a+=1
  
if int(num[1])==1:
  a+=1
  
if int(num[2])==1:
  a+=1
  
print(a)

Submission status: Accepted

Solution code:
math = input()
list(math)
number = int(math[0]) + int(math[1]) + int(math[2])
print(number)

Submission status: Accepted

Solution code:
s = input()
print(sum((s[0] == '1', s[1] == '1', s[2] == '1')))

Submission status: Accepted

Solution code:
s = input()
ans = s.count("1")

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def main():
    # 文字列の入力
    s = input()
    print(s.count("1"))

main()

Submission status: Accepted

Solution code:
S = input()
S = int (S)
A = S // 100
B = (S - A*100) //10
C = S - A*100 - B*10
print ( A + B + C )

Submission status: Accepted

Solution code:
s = input()
s2 = list(s)
#print(s2[1])

count = 0

for i  in range(3):
    if int(s2[i]) == 1:
        count += 1

print(count)

Submission status: Accepted

Solution code:
str = input()
 
count = 0
if str[0] == "1":
  count+=1
if str[1] == "1":
  count+=1
if str[2] == "1":
  count+=1
 
print(count)

Submission status: Accepted

Solution code:
n=input()
print(int(n[0])+int(n[1])+int(n[2]))

Submission status: Accepted

Solution code:
input_val = list(input())

counter = 0

for i in range(len(input_val)):
    if input_val[i] == '1':
        counter+=1

print (counter)

Submission status: Accepted

Solution code:
s = list(map(int, input()))
print(sum(s))

Submission status: Accepted

Solution code:
N = input()

print(N.count("1"))

Submission status: Accepted

Solution code:
a,b,c = map(int,input())
count  = 0
for i in a,b,c:
    if i ==1:
        count = count + 1

print(count)

Submission status: Accepted

Solution code:
N=input()

print(N.count("1"))

Submission status: Accepted

Solution code:
num = int(input())

hun = num // 100
ten = (num % 100) // 10
one = num % 10

print(hun+ten+one)

Submission status: Accepted

Solution code:
in_num = str(input())
sum_num = int(in_num[0]) + int(in_num[1]) + int(in_num[2])
print(sum_num)

Submission status: Accepted

Solution code:
s=input().rstrip()
u=0
for i in range(3):
    u+=int(s[i])
print(u)

Submission status: Accepted

Solution code:
char = input()
list_char = list(char)

print(list_char.count('1'))

Submission status: Accepted

Solution code:
num = list(input())

count = num.count('1')
print(count)

Submission status: Accepted

Solution code:
S=input()
print(int(S[0])+int(S[1])+int(S[2]))

Submission status: Accepted

Solution code:
a, b, c = map(int,input())
print(a+b+c)

Submission status: Accepted

Solution code:
lst = list(input())
cnt = 0

for i in lst:
  if i == "1":
    cnt += 1

print(cnt)

# print(input().count("1"))

Submission status: Accepted

Solution code:
s = str(input())

s_tuple = s[0:1],s[1:2],s[2:3]

i = 0

for sb in s_tuple:
  if sb == '1':
    i = i + 1

print(i)

Submission status: Accepted

Solution code:
a = input()
count = 0
for b in a:
  if b == "1":
    count += 1


print(count)

Submission status: Accepted

Solution code:
X=str(input())
count=0
for i in range(len(X)):
  if X[i]=='1':
    count+=1
  else:
    pass
print(count)

Submission status: Accepted

Solution code:
s = input()
f = 0
for i in range(3):
    if s[i] == '1':
        f = f + 1

print(f)

Submission status: Accepted

Solution code:
s=list(input())
s_int=[int(n) for n in s]
ans=0
for i in range(3):
    if s_int[i]==1:
        ans=ans+1
print(ans)

Submission status: Accepted

Solution code:
li = list(input())

print(li.count("1"))

Submission status: Accepted

Solution code:
list = list(input())
print(list.count('1'))

Submission status: Accepted

Solution code:
def resolve():
    s=input()
    print(s.count('1'))
resolve()

Submission status: Accepted

Solution code:
# coding: utf-8
	
def main():
	# ３文字の文字列を入力
	a = input()
	# 結果を出力
	print(a.count('1'))

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
n = list(map(int, input()))
print(n.count(1))

Submission status: Accepted

Solution code:
how_many_ones = [int(s) for s in input()]
print(how_many_ones.count(1))

Submission status: Accepted

Solution code:
# 番号入力
s = int(input())
# 百の位
a = s//100
# 十の位
b = (s%100)//10
# 一の位
c = s%10
# 1の数を出力
n = a + b + c
print(n)

Submission status: Accepted

Solution code:
count=0
number=input()
numbers=list(number)
for i in numbers:
    if i == '1':
        count+=1
print(count)

Submission status: Accepted

Solution code:
s = input()
cnt = 0
for i in range(3):
    if s[i] == '1':
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
s = input()
c = s.count("1")
print(c)

Submission status: Accepted

Solution code:
N = input()
 
print(N.count("1"))

Submission status: Accepted

Solution code:
num = 0
s = input()
for i in s:
  if int(i) == 1:
    num += 1
print(num)

Submission status: Accepted

Solution code:
num = 0
s = input()
for i in s 	:
	if int(i) == 1 :
		num += 1
print(num)

Submission status: Accepted

Solution code:
s = input()
cnt = s.count("1")
print(cnt)

Submission status: Accepted

Solution code:
a = input()
count = 0
for i in a:
    if i == "1":
        count += 1
print(count)

Submission status: Accepted

Solution code:
list=list(map(int,input()))
a=list.count(1)
print(a)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

sss = input()

print(sss.count('1'))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

sss = input()

cnt = 0
for s in sss:
  if s == '1':
    cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
import numpy as np

a,b,c = input()
#print(a)
#print(b)
#print(c)
s = np.zeros(3)
num = 0
if a == '1':
    num = num + 1
if b == '1':
    num = num + 1
if c == '1':
    num = num + 1
print(num)

Submission status: Accepted

Solution code:
box = input()
count = 0
for i in box:
    if i == "1":
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = str(input())
cnt = 0
for i in range(len(s)):
    if s[i] == '1':
        cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
L = list(map(int,list(input())))
print(sum(L))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 文字列の入力
a = input()
print(int(a[0])+int(a[1])+int(a[2]))

Submission status: Accepted

Solution code:
s =input()
print(s.count("1"))

Submission status: Accepted

Solution code:
str = input()
s1 = str[0]
s2 = str[1]
s3 = str[2]
print(int(s1) + int(s2) + int(s3))

Submission status: Accepted

Solution code:
S=str(input())
n = len([1 for x in S if x=='1'])
print(n)

Submission status: Accepted

Solution code:
s=list(input())
count=0
if s[0]=="1":
    count+=1
if s[1]=="1":
    count+=1
if s[2]=="1":
    count+=1
print(count)

Submission status: Accepted

Solution code:
strTest = input()
print(strTest.count("1"))

Submission status: Accepted

Solution code:

def resolve():
    S = input()
    print(S.count("1"))


if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
S = input()
total = 0
if S[0] == '1':
    total += 1
if S[1] == '1':
    total += 1
if S[2] == '1':
    total += 1
print(total)

Submission status: Accepted

Solution code:
S = input()

total = 0

if S[0] == '1':
    total += 1

if S[1] == '1':
    total += 1

if S[2] == '1':
    total += 1

print(total)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

print(sum([int(i) for i in input()]))

Submission status: Accepted

Solution code:
l = input()
print(l.count('1'))

Submission status: Accepted

Solution code:
n=input()
n=int(n)
og=n
flag=0
while(n>0):
    d=n%10
    n=n//10
    if(d==1):
      flag=flag+1
        
print(flag)

Submission status: Accepted

Solution code:
s=input()
n=0
for i in range(3):
    if s[i]=="1":
        n+=1
print(n)

Submission status: Accepted

Solution code:
a=input()
one=a.count("1")
print(one)

Submission status: Accepted

Solution code:
s = list(input())
cnt = 0
if s[0] == "1":
  cnt +=1
if s[1] == "1":
  cnt +=1
if s[2] == "1":
  cnt +=1
print(cnt)

Submission status: Accepted

Solution code:
print(list(input()).count("1"))

Submission status: Accepted

Solution code:
def main():
    cell = list(input())
    print(cell.count("1"))
main()

Submission status: Accepted

Solution code:
num = input()
count = 0
for i in range(3):
    if num[i] == '1':
        count += 1
print(count)

Submission status: Accepted

Solution code:
suuji = list(map(int,input()))
ans = 0
for i in range(3):
    if(suuji[i]==1):
        ans += 1


print(ans)

Submission status: Accepted

Solution code:
x=input()
print(x.count("1"))

Submission status: Accepted

Solution code:
s = input()
ans = 0
for one in s:
    if one == '1':
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
lists = list(input())
total = 0
for i in lists:
    if i == '1':
        total = total + 1
    elif i == '0':
        total = total
    else:
        total = xxx

print(total)

Submission status: Accepted

Solution code:
l = input()#三文字まで
counter = 0
for i in range(3):
    if l[i] == "1":
        counter += 1
print(counter)

Submission status: Accepted

Solution code:
l = input()#三文字まで
counter = 0
if l[0] == "1":
    counter += 1
if l[1] == "1":
    counter += 1
if l[2] == "1":
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
s = list(input())
print(s.count("1"))

Submission status: Accepted

Solution code:
a = list(input())
count = 0

for i in a:
  if i=='1':
    count+=1

print(count)

Submission status: Accepted

Solution code:
x=int(input())
if x == 0:
    print(0)
elif x == 1:
    print(1)
elif x == 10:
    print(1)
elif x == 100:
    print(1)
elif x == 11:
    print(2)
elif x == 101:
    print(2)
elif x == 110:
    print(2)
else:
    print(3)

Submission status: Accepted

Solution code:
a = input()
a_list = list(a)
print(a_list.count("1"))

Submission status: Accepted

Solution code:
s = input()
print( s.count('1') )

Submission status: Accepted

Solution code:
a = input()
if(a[0] == "1")and(a[1] == "1")and(a[2] == "1"):
    print(3)
elif (a[0] == "0")and(a[1] =="0")and(a[2] == "0"):
    print(0) 
elif(a[0] == "1")and(a[1] == "0")and(a[2] == "0"):
    print(1)
elif(a[0] == "0")and(a[1] == "1")and(a[2] == "0"):
    print(1)
elif(a[0] == "0")and(a[1] == "0")and(a[2] == "1"):
    print(1)
else:
    print(2)

Submission status: Accepted

Solution code:
s = input()
a = 0
for c in s:
    if c == '1':
        a += 1
print(a)

Submission status: Accepted

Solution code:
n = input()
print(n.count("1"))

Submission status: Accepted

Solution code:
a, b, c = input()
print(int(a)+int(b)+int(c))

Submission status: Accepted

Solution code:
print(input().count("1"))

Submission status: Accepted

Solution code:
icase=0    
if icase==0:
    s=map(int,list(input()))
    print(sum(s))

Submission status: Accepted

Solution code:
n = list(input())

ans = 0
for i in range(3):
    if n[i] == "1":
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s=input()
sum=0
for i in range(3):
  if int(s[i])==1:
    sum+=1
print(sum)

Submission status: Accepted

Solution code:
print(sum(int(j) for j in input()))

Submission status: Accepted

Solution code:
S = list(str(input()))
print(S.count('1'))

Submission status: Accepted

Solution code:
temp = input()
counter = 0
for i in range(len(temp)):
  if temp[i] == "1":
    counter += 1
print(counter)

Submission status: Accepted

Solution code:
board =  input()
 
counter = 0
 
if board[0] == "1":
  counter+=1
if board[1] == "1":
  counter+=1
if board[2] == "1":
  counter+=1
  
print(counter)

Submission status: Accepted

Solution code:
sss = input()
s1 = int(sss[0])
s2 = int(sss[1])
s3 = int(sss[2])
print(s1+s2+s3)

Submission status: Accepted

Solution code:
s=list(input())
print(s.count("1"))

Submission status: Accepted

Solution code:
li = list(map(int,input()))	

print(li.count(1))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

a = input()
print(a.count("1"))

Submission status: Accepted

Solution code:
ans = 0
s = input()

if s[0]=='1': ans+=1
if s[1]=='1': ans+=1
if s[2]=='1': ans+=1

print(ans)

Submission status: Accepted

Solution code:
str = input()
str_list = list(str)
count = 0
for i in str_list:
    if i == "1":
        count+=1

print(count)

Submission status: Accepted

Solution code:
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    S = iss()
    print(S.count('1'))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
st = input()
tl = 0
for s in st[:]:
  tl += int(s)
print(tl)

Submission status: Accepted

Solution code:
s=input()

print(s.count('1'))

Submission status: Accepted

Solution code:
S = input()

count = 0

for s in S:
  if s == "1":
    count += 1

print(count)

Submission status: Accepted

Solution code:
number = str(input())
count = 0

for n in number:
  if n == "1":
    count += 1

print(count)

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add
print(reduce(add, map(int, input())))

Submission status: Accepted

Solution code:

def main():
    lst = list(map(int, list(input())))
    print(len(list(filter(lambda e:e == 1, lst))))

main()

Submission status: Accepted

Solution code:
s=input()
x=0
for i in range(len(s)):
    if s[i]=="1":
        x+=1
print(x)

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    a = input()
    s = 0
    for i in a:
        #print(i)
        if i == '1':
            s += 1
    print(s)

Submission status: Accepted

Solution code:
s=input()
x=int(s[0])+int(s[1])+int(s[2])
print(x)

Submission status: Accepted

Solution code:
s = input()
count = 0

for i in s:
    if i =='1':
        count += 1

print(count)

Submission status: Accepted

Solution code:
s = str(input())
counter = 0

if s[0] == str(1):
    counter += 1
if s[1] == str(1):
    counter += 1
if s[2] == str(1):
    counter += 1

print(counter)

Submission status: Accepted

Solution code:
l = list(input())
print(l.count("1"))

Submission status: Accepted

Solution code:
s = str(input())
ans = s.count("1")
print(ans)

Submission status: Accepted

Solution code:
a = input()
b = 0
for i in range(3):
	if a[i] == "1":
		b = b+1
print(b)

Submission status: Accepted

Solution code:
s=str(input())
print(s.count('1'))

Submission status: Accepted

Solution code:
s = list(input())
count = 0
for i in range(len(s)):
    if s[i] == '1':
        count += 1
print(count)

Submission status: Accepted

Solution code:
s = str(input())
counter = 0
if s[0] == '1':
  counter += 1
if s[1] == '1':
  counter += 1
if s[2] == '1':
  counter += 1
print(counter)

Submission status: Accepted

Solution code:
import collections
print(collections.Counter(list(input()))["1"])

Submission status: Accepted

Solution code:
#入力
a,b,c = (int(x) for x in input())

#結果
print(a+b+c)

Submission status: Accepted

Solution code:
stringNumbers = list(input())

count = 0
for stringNum in stringNumbers:
    if stringNum == '1':
        count+=1

print(count)

Submission status: Accepted

Solution code:
n= list(map(int,input()))
print(n.count(1))

Submission status: Accepted

Solution code:
import io

print(input().count("1"))

Submission status: Accepted

Solution code:
s = input()
count = 0
for _ in s:
  if _ == "1":
    count += 1
print(count)

Submission status: Accepted

Solution code:
a=input()
ans=0

for i in range(3):
  if a[i]=='1':
    ans=ans+1

print(ans)

Submission status: Accepted

Solution code:
str=input()
cnt=0
for i in range(len(str)):
  if(str[i]=='1'):
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
A = input()

ans = 0

for i in range(len(A)):
    if A[i] == '1':
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
s = input()

print(sum(list(map(int, s))))

Submission status: Accepted

Solution code:
a = input()
 
print(a.count("1"))

Submission status: Accepted

Solution code:
s = input()
print(len([i for i in s if i == '1']))

Submission status: Accepted

Solution code:
a = str(input())
count = 0

for i in list(a):
  if i == "1":
    count = count +1
print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

s = input()
count = 0
for i in s:
  if i == "1":
    count += 1
print(count)

Submission status: Accepted

Solution code:
s = input()

ans = 0

for i in range(3):
    if s[i] == "1":
       ans += 1
       
print(ans)

Submission status: Accepted

Solution code:
a = input()
a = list(a)
count = 0
for s in a:
	if s == "1":
		count += 1

print(count)

Submission status: Accepted

Solution code:
s = input()

ret = 0
for i in s:
  ret += int(i)
print(ret)

Submission status: Accepted

Solution code:
s = input()
print(int(s[0])+int(s[1])+int(s[2]))

Submission status: Accepted

Solution code:
a = input()
a = list(str(a))
count = 0
if a[0] == "1":
  count += 1
if a[1] == "1":
  count += 1
if a[2] == "1":
  count += 1
print(count)

Submission status: Accepted

Solution code:
a = input().count('1')
print(a)

Submission status: Accepted

Solution code:
num = input()
print(num.count('1'))

Submission status: Accepted

Solution code:
print(sum([1 for i in input() if i == '1']))

Submission status: Accepted

Solution code:
S=input()

count=0

for i in range(3):
  if S[i]=='1':
    count = count +1
  
print(count)

Submission status: Accepted

Solution code:
a, b, c = input()
s = 0
if a == '1':
  s += 1
if b == '1':
  s += 1
if c == '1':
  s += 1
print(s)

Submission status: Accepted

Solution code:
s1,s2,s3 = map(int,input())
a = [0]
b = 0
a.append(s1)
a.append(s2)
a.append(s3)
for i in a:
  if i == 1:
    b += 1
print(b)

Submission status: Accepted

Solution code:
a = int(input())
b = 0
if (a-100) >= 0:
  a = a -100
  b = b + 1 
if (a-10) >= 0:
  a = a -10
  b = b +1
if (a-1) >= 0:
  b = b + 1
print(b)

Submission status: Accepted

Solution code:
s=str(input())
strings="0","1"
cnt=0
for i in range(3):
    if s[i]=="1":
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N = int(input())  # ここで標準入力
out = N/100 + (N%100)/10 + N%10
print(int(out))

Submission status: Accepted

Solution code:
s_nums = input()
ans = 0
for nums in s_nums:
    if int(nums) == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s1,s2,s3 = map(int,input())
s = [s1,s2,s3]
S = s.count(1)
if(S == 0):
    print(0)
if(S == 1):
    print(1)
if(S == 2):
    print(2)
if(S == 3):
    print(3)

Submission status: Accepted

Solution code:
n = int(input())
print(sum([int(x) for x in list(str(n))]))

Submission status: Accepted

Solution code:
print(int(input()) % 9)

Submission status: Accepted

Solution code:
s=(input())

print(s.count("1"))

Submission status: Accepted

Solution code:

li = list(input())
l = list(map(int, li))
filtered = list(filter(lambda x:x == 1, l))
print(len(filtered))

Submission status: Accepted

Solution code:
# ABC081 A

def main():
    s = input()

    print(s.count('1'))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input()
count = 0
for i in a:
  if i == "1":
    count += 1
print(count)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

INF = float('inf')


def main():
    s = list(input())
    counter = 0
    for i in s:
        if i == '1':
            counter += 1

    print(counter)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()
counter=0
for i in range(len(s)):
  counter+=int(s[i])
print(counter)

Submission status: Accepted

Solution code:
# coding: utf-8

s = input()

sum = 0

if s[0] == "1":
    sum = sum + 1
if s[1] == "1":
    sum = sum + 1
if s[2] == "1":
    sum += 1

print(sum)

Submission status: Accepted

Solution code:
# coding: utf-8
s = input()
ans = s.count('1')
print(ans)

Submission status: Accepted

Solution code:
import random

masu_list = input()

print(masu_list.count('1'))

Submission status: Accepted

Solution code:
line = input()
answer = line.count("1")
print(answer)

Submission status: Accepted

Solution code:
S=input()
print(S.count('1'))

Submission status: Accepted

Solution code:
N = int(input())

sum = 0
for i in range(3):
    if ((N >> i) & 1):
        sum += 1
        
print(sum)

Submission status: Accepted

Solution code:
# 文字列を入力
number = list(input())
# カウントの設置
count = 0
# 各桁の判定
if number[0] == '1':
    count += 1
if number[1] == '1':
    count += 1
if number[2] == '1':
    count += 1
# 出力
print(count)

Submission status: Accepted

Solution code:
s = str(input())
print(s.count('1'))

Submission status: Accepted

Solution code:
from sys import stdin

s1, s2, s3 = [int(x) for x in list(stdin.readline().rstrip())]

print(s1+s2+s3)

Submission status: Accepted

Solution code:
import sys
from collections import Counter

s = sys.stdin.readline().rstrip()

def main():
    c = Counter(s)
    print(c.get('1', 0))

if __name__ ==  '__main__':
    main()

Submission status: Accepted

Solution code:
N = input()
print(N.count("1") )

Submission status: Accepted

Solution code:
s = input()

count = 0
for i in range(len(s)):
    if s[i]== '1':
        count+=1

print(count)

Submission status: Accepted

Solution code:
# ABC 081: A – Placing Marbles
print(input().count('1'))

Submission status: Accepted

Solution code:
# ABC 081: A – Placing Marbles
n = input()
print(n.count('1'))

Submission status: Accepted

Solution code:
print(sum(list(map(int,input()))))

Submission status: Accepted

Solution code:
print(sum(list(map(int, input()))))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

S = input()
print(S.count("1"))

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

if __name__ == '__main__':
    a = input()
    count =0
    for i in a:
        if i == "1":
            count +=1
    print(count)

Submission status: Accepted

Solution code:
s = str(input())
s_list = [int(s[0]),int(s[1]),int(s[2])]
count = 0
for i in s_list:
    if i==1:
        count +=1
print(count)

Submission status: Accepted

Solution code:
def nyu():
    num1= input()
#   num1 = int(num1)
    return num1

def convert(num1):
    lst_num = list(num1)
    #print(lst_num)
    #for x in list(lst_num):
    return lst_num

def check(lst_num):
    i =0
    sum = 0
    for x in list(lst_num):
   #     print("i=",i,"lst_num=",x)
   #     i+=1
        if(x == "1"):
            sum +=1
    print(sum)    

s = nyu()
lst = convert(s)
check(lst)

Submission status: Accepted

Solution code:
s = input()
res = 0
if s[0] == '1':
  res += 1
if s[1] == '1':
  res += 1
if s[2] == '1':
  res += 1
print(res)

Submission status: Accepted

Solution code:
a = input()

cnt = 0

for c in a:
  if (c == '1'):
    cnt=cnt + 1
  
print(cnt)

Submission status: Accepted

Solution code:
s=str(input())
print(s.count("1"))

Submission status: Accepted

Solution code:
a, b, c = map(int, input())
print(a + b + c)

Submission status: Accepted

Solution code:
s = input()
count = 0
if s[0]=='1':
    count+=1
if s[1]=='1':
    count+=1
if s[2]=='1':
    count+=1
print(count)

Submission status: Accepted

Solution code:
s1,s2,s3=map(int,input())
#print(s3)
ans=0
if s1==1:
  ans+=1
if s2==1:
  ans+=1
if s3==1:
  ans+=1
print(ans)

Submission status: Accepted

Solution code:
s_list = list((input()))
count = 0
for i in range(3):
    if s_list[i] == "1":
        count += 1

print(count)

"""
count_one = lambda x: x == "1"
print(len(list(filter(count_one,s_list))))
"""

Submission status: Accepted

Solution code:
s_list = list((input()))
count_one = lambda x: x == "1"
print(len(list(filter(count_one,s_list))))

Submission status: Accepted

Solution code:
# 空リストsを用意する
s = []
# sに各桁の整数を入れる
s = map(int, input())
# sの合計値を出力する
print(sum(s))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力の取得
square = list(map(int, list(input())))

# ビー玉が置かれているマスの総和を算出
print(sum(square))

Submission status: Accepted

Solution code:
S=list(input())
count=0
for i in range(len(S)):
    if S[i]=='1':
        count+=1
print(count)

Submission status: Accepted

Solution code:
s = input()
counter = 0
for i in range(len(s)):
    if s[i] == '1':
        counter += 1
    else:
        pass
print(counter)

Submission status: Accepted

Solution code:
A = list(map(int,input()))
print(sum(A))

Submission status: Accepted

Solution code:
a = input()
counter = 0
if a[0] == "1":
    counter+=1
if a[1] == "1":
    counter+=1
if a[2] == "1":
    counter+=1
print(counter)