結果
| 問題 | No.2516 Credit Creation |
| コンテスト | |
| ユーザー |
MasKoaTS
|
| 提出日時 | 2022-08-11 10:34:55 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 785 ms |
| コンパイル使用メモリ | 66,516 KB |
| 最終ジャッジ日時 | 2025-01-30 20:07:19 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#include <iostream>
#define rep(i, l, n) for (int i = (l); i < (n); i++)
using namespace std;
int main(void) {
int n; cin >> n;
double r; cin >> r;
double ans = 0.0;
double now = 100.0;
rep(i, 0, n) {
ans += now;
now *= 1.0 - r;
}
printf("%.9f\n", ans);
return 0;
}
MasKoaTS