結果

問題 No.1464 Number Conversion
ユーザー aaaaaaaaaa2230
提出日時 2021-04-02 22:03:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 389 ms
コンパイル使用メモリ 82,224 KB
実行使用メモリ 52,096 KB
最終ジャッジ日時 2024-12-23 19:29:43
合計ジャッジ時間 2,801 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
x = input()

s = 0
check = False
b = 1
for i in range(len(x)):
    if x[i] == ".":
        check = True
        b = 10**(len(x)-i-1)
        continue
    s *= 10
    s += int(x[i])


g = math.gcd(s,b)
s //= g
b //= g
print("{}/{}".format(s,b))
0