I am an undergraduate student in IIIT Hyderabad. CS
q=0w=input()while w: w-=1 a=input() if a>0:q+=aprint q
Use exec. ;-)And if You want more shortening tasks, visit:http://www.spoj.pl/SHORTEN
thanks, i think i can use that to reduce some more of my constructions,are there other reductions also to print and scan input in python ?
c=0i=inputexec('b=i();c+=b*(b>0);'*i())print c
Use exec. ;-)
ReplyDeleteAnd if You want more shortening tasks, visit:
http://www.spoj.pl/SHORTEN
thanks, i think i can use that to reduce some more of my constructions,
ReplyDeleteare there other reductions also to print and scan input in python ?
c=0
ReplyDeletei=input
exec('b=i();c+=b*(b>0);'*i())
print c