結果
問題 | No.1464 Number Conversion |
ユーザー | aaaaaaaaaa2230 |
提出日時 | 2021-04-02 21:45:18 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 252 bytes |
コンパイル時間 | 443 ms |
コンパイル使用メモリ | 87,288 KB |
実行使用メモリ | 71,780 KB |
最終ジャッジ日時 | 2023-08-25 11:56:28 |
合計ジャッジ時間 | 5,232 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 76 ms
71,596 KB |
testcase_01 | AC | 138 ms
71,460 KB |
testcase_02 | AC | 137 ms
71,580 KB |
testcase_03 | AC | 140 ms
71,608 KB |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | AC | 140 ms
71,380 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | AC | 67 ms
71,488 KB |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 71 ms
71,508 KB |
testcase_28 | AC | 71 ms
71,272 KB |
ソースコード
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))