結果

問題 No.1464 Number Conversion
コンテスト
ユーザー aaaaaaaaaa2230
提出日時 2021-04-02 21:45:18
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 64 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 56,400 KB
最終ジャッジ日時 2026-10-06 17:05:09
合計ジャッジ時間 2,351 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 8 WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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))
0