結果

問題 No.2516 Credit Creation
コンテスト
ユーザー MasKoaTS
提出日時 2022-08-11 10:17:26
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 325 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 192 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2026-04-06 06:10:23
合計ジャッジ時間 1,011 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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('.'))
0