a241: 第二題:1 / x 是有限小數
編輯歷史
| 時間 | 作者 | 版本 |
|---|---|---|
| 2017-07-19 14:10 – 14:10 | r0 – r1 | |
顯示 diff-
+ a241: 第二題:1 / x 是有限小數
+ http://zerojudge.tw/ShowProblem?problemid=a241
+ *def x2(i):
+ * global count,n
+ * if i*2<=n:
+ * #print("x2",i*2)
+ * count+=1
+ * x5(i)
+ * x2(i*2)
+ *
+ *def x5(i):
+ * global count,n
+ * if i*5<=n:
+ * #print("x5",i*5)
+ * count+=1
+ * x5(i*5)
+ *
+ *m = int(input(''))
+ *for _ in range(m):
+ * n = int(input(''))
+ * count = 0
+ * x2(1)
+ * print(count)
|
||