結果
| 問題 |
No.1464 Number Conversion
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-02 21:45:18 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 252 bytes |
| コンパイル時間 | 279 ms |
| コンパイル使用メモリ | 82,552 KB |
| 実行使用メモリ | 54,104 KB |
| 最終ジャッジ日時 | 2024-12-23 18:58:00 |
| 合計ジャッジ時間 | 2,462 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 21 |
ソースコード
import math
x = input()
s = 0
check = False
b = 1
for i in range(len(x)):
s *= 10
if x[i] == ".":
check = True
b = 10**(len(x)-i-1)
else:
s += int(x[i])
g = math.gcd(s,b)
s //= g
b //= g
print("{}/{}".format(s,b))