import sys f=open("in6_9.txt",'r') f1=open("out_9_6_9.txt",'w') import time start=time.clock() inputfile1,inputfile2,inputfile3=f.readline().split(",") x=int(inputfile1) d=int(inputfile2) n=int(inputfile3) b=(n/2)*(2*x+(n-1)*d) t1=time.clock()-start total=sys.getsizeof(x)+sys.getsizeof(d)+sys.getsizeof(n)+sys.getsizeof(t1)+sys.getsizeof(b) f1.write("\nSum of no.="+str(b)+"\ntime="+str(t1)+"\ntotal memory used is="+str(total)+"\nno of muliplication=3"+"\nno of addition=2") f1.close() f.close()