結果
問題 |
No.2516 Credit Creation
|
ユーザー |
![]() |
提出日時 | 2023-10-17 12:17:17 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 235 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 53,616 KB |
最終ジャッジ日時 | 2024-09-17 10:35:51 |
合計ジャッジ時間 | 1,260 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
import sys input = sys.stdin.readline n = int(input()) _, s = input()[:-1].split('.') if(len(s) == 1): s += '0' r = 100 - int(s) dep = 0 now = 100 for _ in [0] * n: dep = dep * 100 + now now *= r s = str(dep) dec_pt = len(s) - (n - 1) * 2 ans = ''.join([s[:dec_pt], '.', s[dec_pt:]]).rstrip('0').rstrip('.') print(ans)