結果
| 問題 | No.2516 Credit Creation |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2022-08-11 10:17:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 325 bytes |
| 記録 | |
| コンパイル時間 | 161 ms |
| コンパイル使用メモリ | 82,076 KB |
| 実行使用メモリ | 54,104 KB |
| 最終ジャッジ日時 | 2024-09-17 10:35:49 |
| 合計ジャッジ時間 | 1,216 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
import sys
input = sys.stdin.readline
n = int(input())
s = input()[2:].rstrip()
if(len(s) == 1):
s += '0'
a = 100 - int(s)
money = 0
now = 100
for _ in [0] * n:
money = money * 100 + now
now *= a
s = str(money)
zero = (n - 1) * 2
id = len(s) - zero
ans = ''.join([s[:id],'.',s[id:]]).rstrip('0')
print(ans.rstrip('.'))
MasKoaTS