2016年7月17日 星期日

ITSA Basic 題目24. 計算複利

http://e-tutor.itsa.org.tw/e-Tutor/mod/programming/view.php?a=15915

這題必須要用Python才能AC用其他語言都不能過,我也不知道原因測試了很久,這題是要你算出複利所以每次都要乘上1+月利率
raw_input() 是標準輸入(存入字串變數)
n1=int(n)  
r1=float(r) 這兩個是轉換資料型別並存入新變數

沒有留言:

張貼留言