結果
| 問題 |
No.25 有限小数
|
| コンテスト | |
| ユーザー |
aaaaa
|
| 提出日時 | 2017-03-02 20:57:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 267 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-06-13 01:39:55 |
| 合計ジャッジ時間 | 1,968 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 9 |
ソースコード
import fractions
def F(n):
while n%2==0:n//=2
while n%5==0:n//=5
return n == 1
n,m=int(input()),int(input())
if F(fractions.Fraction(n,m).denominator):
for x in str(format(n/m,'.14f'))[::-1]:
if x not in['0','.'] :print(x);break
else:print(-1)
aaaaa