发布时间:2019-07-24 09:50:17编辑:auto阅读(2748)
Python在有些时候比c++还是好用多了,比如biginteger和一道校赛题
在这里简单总结一下Python的多组输入方式
1.while(~~~!=EOF)
题目A+B:
由于要一行读入2个数,所以有点细节要注意
while True: try: a,b = map(int,input().split()) print(a+b) except: break;
2.T组A+B
题目一道校赛题
代码:
n=int(input()) for i in range(n): m=int(input()) a=int(input()) print(m+a)
如果这题要用c++,由于前导0,确实有点麻烦
关键字:
上一篇: python中的size,shape,l
下一篇: Python_关于pymongo与bso
52411
52335
42442
39344
33810
30761
29513
24434
24293
22661
189°
197°
200°
233°
192°
319°
316°
335°
337°
385°