結果
| 問題 |
No.3358 逆数の小数部分
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-18 15:10:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 288 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,368 KB |
| 最終ジャッジ日時 | 2025-11-18 15:10:40 |
| 合計ジャッジ時間 | 3,032 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 35 WA * 1 |
ソースコード
s = input()
a = ''
b = 1
dec = False
for c in s:
if c == '.':
dec = True
continue
if dec:
b *= 10
a += c
if b == 1:
print(2)
exit()
a = int(a)
cnt = 0
while b != 1 and a % b != 0:
t = a
a = b
b = t
a %= b
cnt += 1
print(cnt)