HDU 1004 Let the Balloon Rise python实现

# -*- coding:utf-8 -*-
import sys
import re

def main():
    num=raw_input("");
    nums=int(num);
    ss=[]
    for i in range(nums):
     what = raw_input("");
     if len(what)<15:
       ss.append(what);
     else:
         print "error"
         break;
    if len(ss)==nums:
     print ss;
    
if __name__ == '__main__':
    main()

你可能感兴趣的:(python自学)