結果
問題 |
No.1076 寿司打
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:06:15 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 109 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 160 ms |
コンパイル使用メモリ | 82,880 KB |
実行使用メモリ | 80,712 KB |
最終ジャッジ日時 | 2025-03-20 21:06:20 |
合計ジャッジ時間 | 2,210 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
from decimal import Decimal p_str = input().strip() p = Decimal(p_str) denominator = Decimal(1) - p if denominator == 0: print(0) else: e = p / denominator e_str = format(e, 'f') # Convert to non-exponential string if '.' in e_str: e_str = e_str.rstrip('0').rstrip('.') print(e_str)