[Offer收割]编程练习赛107 register

Ended

Participants:61

Verdict:Accepted
Score:100 / 100
Submitted:2019-09-01 13:34:15

Lang:Python2

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
s = str(input())
ans = 1
for c in s:
    if (c >= '3'):
        ans *= 0;
    elif (c == '2'):
        ans *= 1;
    elif (c == '0'):
        ans *= 1;
    elif (c == '1'):
        ans *= 2;
print (ans // 2) + (ans % 2) 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX