- 乒乓球
- 2020-04-09 22:02:01 @
同样的代码第一遍提交只过五个点
第二遍就全过了
???
def win21(condit):
score1=0
score2=0
for i in condit:
if(i=='W'):
score1+=1
else:
score2+=1
if(score1>=21 and score1-score2>=2):
print("%d:%d"%(score1, score2))
score1=0
score2=0
elif(score2>=21 and score2-score1>=2):
print("%d:%d"%(score1, score2))
score1=0
score2=0
print("%d:%d"%(score1, score2))
def win11(condit):
score1=0
score2=0
for i in condit:
if(i=='W'):
score1+=1
else:
score2+=1
if(score1>=11 and score1-score2>=2):
print("%d:%d"%(score1, score2))
score1=0
score2=0
elif(score2>=11 and score2-score1>=2):
print("%d:%d"%(score1, score2))
score1=0
score2=0
print("%d:%d"%(score1, score2))
condit=list()
while(1):
string=input()
flag=1
for i in string:
if(i=='E'):
flag=0
break
else:
condit.append(i)
if(flag==0):
break;
if(len(condit)==0):
print("0:0")
print("")
print("0:0")
else:
win11(condit)
print("")
win21(condit)
1 条评论
-
eason66 LV 6 @ 2020-04-17 14:29:07
C++(兼C)党帮不了你
- 1