@3632qaz
2016-11-20T07:08:15.000000Z
字数 859
阅读 2350
uce
socre=int(raw_input())if socre>=90:print 'A'elif socre>60:print 'B'else:print'C'
for n in range(100,1000):i = n / 100j = n / 10 % 10k = n % 10if n == i ** 3 + j ** 3 + k ** 3:print n
word=raw_input('pleas input a word:\n')for i in word:print i+'\n'
def fib(n):if n==1 or n==2:return 1return fib(n-1)+fib(n-2)
s = raw_input('input a string:\n')letters = 0space = 0digit = 0others = 0for c in s:if c.isalpha():letters += 1elif c.isspace():space += 1elif c.isdigit():digit += 1else:others += 1print 'char = %d,space = %d,digit = %d,others = %d' % (letters,space,digit,others)
year = int(raw_input('year:\n'))month = int(raw_input('month:\n'))day = int(raw_input('day:\n'))months = (0,31,59,90,120,151,181,212,243,273,304,334)if 0 < month <= 12:sum = months[month - 1]else:print 'data error'sum += dayleap = 0if (year % 400 == 0) or ((year % 4 == 0) and (year % 100 != 0)):leap = 1if (leap == 1) and (month > 2):sum += 1print 'it is the %dth day.' % sum