結果
| 問題 | No.2516 Credit Creation |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2023-10-17 12:17:17 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 64 ms / 2,000 ms |
| + 683µs | |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 236 ms |
| コンパイル使用メモリ | 96,108 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-08-29 12:15:37 |
| 合計ジャッジ時間 | 2,100 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)
MasKoaTS