結果
| 問題 | No.25 有限小数 |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-12-24 00:10:05 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 23 ms / 5,000 ms |
| + 296µs | |
| コード長 | 310 bytes |
| 記録 | |
| コンパイル時間 | 68 ms |
| コンパイル使用メモリ | 81,760 KB |
| 実行使用メモリ | 56,056 KB |
| 最終ジャッジ日時 | 2026-10-06 21:25:09 |
| 合計ジャッジ時間 | 2,638 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
ソースコード
N = int(input())
M = int(input())
X2 = 0
M2 = M
while M2 % 2 == 0:
M2 //= 2
N *= 5
while M2 % 5 == 0:
M2 //= 5
N *= 2
if M2 != 1:
if N % M2 == 0:
N //= M2
else:
print(-1)
exit()
S = str(N)
for s in reversed(S):
if s != "0":
print(s)
exit()
ntuda