結果

問題 No.1464 Number Conversion
ユーザー rodearodea
提出日時 2021-04-09 15:45:30
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 220 ms / 2,000 ms
コード長 201 bytes
コンパイル時間 2,649 ms
コンパイル使用メモリ 86,652 KB
実行使用メモリ 89,260 KB
最終ジャッジ日時 2023-09-07 03:58:39
合計ジャッジ時間 8,826 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 208 ms
89,020 KB
testcase_01 AC 211 ms
88,892 KB
testcase_02 AC 213 ms
89,000 KB
testcase_03 AC 208 ms
89,028 KB
testcase_04 AC 212 ms
88,984 KB
testcase_05 AC 212 ms
88,884 KB
testcase_06 AC 217 ms
88,888 KB
testcase_07 AC 212 ms
89,020 KB
testcase_08 AC 216 ms
88,784 KB
testcase_09 AC 219 ms
89,088 KB
testcase_10 AC 219 ms
89,092 KB
testcase_11 AC 212 ms
89,016 KB
testcase_12 AC 211 ms
89,096 KB
testcase_13 AC 216 ms
88,720 KB
testcase_14 AC 211 ms
88,980 KB
testcase_15 AC 211 ms
88,988 KB
testcase_16 AC 217 ms
88,740 KB
testcase_17 AC 210 ms
88,964 KB
testcase_18 AC 217 ms
89,112 KB
testcase_19 AC 208 ms
89,104 KB
testcase_20 AC 210 ms
89,084 KB
testcase_21 AC 220 ms
89,196 KB
testcase_22 AC 212 ms
89,260 KB
testcase_23 AC 210 ms
88,996 KB
testcase_24 AC 212 ms
88,888 KB
testcase_25 AC 209 ms
88,952 KB
testcase_26 AC 212 ms
89,140 KB
testcase_27 AC 210 ms
89,152 KB
testcase_28 AC 208 ms
88,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from decimal import Decimal
from math import gcd

x = Decimal(input())

den = 1
while x - int(x) != 0:
    x *= 10
    den *= 10

x = int(x)
g = gcd(x, den)
x //= g
den //= g

print("%d/%d" % (x, den))
0