結果
| 問題 | No.25 有限小数 |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-12-23 23:57:38 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 255 bytes |
| 記録 | |
| コンパイル時間 | 408 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 51,840 KB |
| 最終ジャッジ日時 | 2026-05-29 21:15:04 |
| 合計ジャッジ時間 | 4,560 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 17 WA * 14 |
ソースコード
N = int(input())
M = int(input())
X2 = 0
M2 = M
while M2 % 2 == 0:
M2 //= 2
while M2 % 5 == 0:
M2 //= 5
if M2 != 1:
print(-1)
exit()
S = str(N*10**18/M)
for s in reversed(S):
if s != "0" and s != ".":
print(s)
exit()
ntuda