結果

問題 No.1464 Number Conversion
ユーザー medchemmedchem
提出日時 2021-09-17 08:21:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 235 ms / 2,000 ms
コード長 202 bytes
コンパイル時間 399 ms
コンパイル使用メモリ 86,752 KB
実行使用メモリ 89,064 KB
最終ジャッジ日時 2023-09-12 04:19:00
合計ジャッジ時間 8,585 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 234 ms
88,560 KB
testcase_01 AC 235 ms
88,976 KB
testcase_02 AC 232 ms
88,620 KB
testcase_03 AC 233 ms
88,920 KB
testcase_04 AC 234 ms
88,556 KB
testcase_05 AC 232 ms
88,700 KB
testcase_06 AC 234 ms
88,972 KB
testcase_07 AC 235 ms
88,704 KB
testcase_08 AC 234 ms
88,732 KB
testcase_09 AC 231 ms
88,772 KB
testcase_10 AC 230 ms
88,808 KB
testcase_11 AC 229 ms
88,728 KB
testcase_12 AC 231 ms
88,512 KB
testcase_13 AC 231 ms
88,776 KB
testcase_14 AC 233 ms
89,056 KB
testcase_15 AC 233 ms
88,704 KB
testcase_16 AC 233 ms
88,776 KB
testcase_17 AC 231 ms
88,876 KB
testcase_18 AC 235 ms
88,968 KB
testcase_19 AC 231 ms
88,700 KB
testcase_20 AC 232 ms
88,864 KB
testcase_21 AC 229 ms
88,840 KB
testcase_22 AC 232 ms
88,776 KB
testcase_23 AC 228 ms
88,876 KB
testcase_24 AC 228 ms
88,872 KB
testcase_25 AC 232 ms
88,704 KB
testcase_26 AC 228 ms
88,684 KB
testcase_27 AC 230 ms
89,064 KB
testcase_28 AC 233 ms
88,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
from decimal import Decimal

def lcm(a,b):
    lcm=a*b//math.gcd(a,b)
    return lcm

x=Decimal(input())
x*=10**8
x=int(x)

S=x
B=10**8

gcd=math.gcd(S,B)

print(str(S//gcd)+"/"+str(B//gcd))
0