結果
| 問題 |
No.1464 Number Conversion
|
| コンテスト | |
| ユーザー |
yuusanlondon
|
| 提出日時 | 2021-04-02 21:46:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 214 ms |
| コンパイル使用メモリ | 81,664 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-12-23 18:59:00 |
| 合計ジャッジ時間 | 2,238 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
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))
yuusanlondon