結果

問題 No.1464 Number Conversion
ユーザー yuusanlondonyuusanlondon
提出日時 2021-04-02 21:46:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 590 ms
コンパイル使用メモリ 87,276 KB
実行使用メモリ 71,840 KB
最終ジャッジ日時 2023-08-25 11:57:26
合計ジャッジ時間 3,638 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,372 KB
testcase_01 AC 70 ms
71,784 KB
testcase_02 AC 70 ms
71,740 KB
testcase_03 AC 70 ms
71,588 KB
testcase_04 AC 70 ms
71,652 KB
testcase_05 AC 73 ms
71,536 KB
testcase_06 AC 71 ms
71,804 KB
testcase_07 AC 69 ms
71,568 KB
testcase_08 AC 71 ms
71,212 KB
testcase_09 AC 70 ms
71,508 KB
testcase_10 AC 69 ms
71,572 KB
testcase_11 AC 71 ms
71,608 KB
testcase_12 AC 70 ms
71,600 KB
testcase_13 AC 69 ms
71,348 KB
testcase_14 AC 70 ms
71,448 KB
testcase_15 AC 71 ms
71,428 KB
testcase_16 AC 69 ms
71,356 KB
testcase_17 AC 70 ms
71,380 KB
testcase_18 AC 71 ms
71,428 KB
testcase_19 AC 70 ms
71,760 KB
testcase_20 AC 70 ms
71,588 KB
testcase_21 AC 69 ms
71,840 KB
testcase_22 AC 69 ms
71,428 KB
testcase_23 AC 73 ms
71,600 KB
testcase_24 AC 74 ms
71,504 KB
testcase_25 AC 72 ms
71,608 KB
testcase_26 AC 71 ms
71,568 KB
testcase_27 AC 71 ms
71,356 KB
testcase_28 AC 70 ms
71,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
s=input()
a=[]
count=8
flag=0
for i in s:
  if i=='.':
    flag=1
    continue
  a.append(i)
  if flag:
    count-=1
for i in range(count):
  a.append('0')
n=int(''.join(a))
r=math.gcd(n,10**8)
ans=[str(n//r),'/',str((10**8)//r)]
print(''.join(ans))
0