結果
| 問題 | No.2516 Credit Creation |
| コンテスト | |
| ユーザー |
ikoma
|
| 提出日時 | 2023-10-27 22:01:48 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 2,000 ms |
| + 891µs | |
| コード長 | 655 bytes |
| 記録 | |
| コンパイル時間 | 11,603 ms |
| コンパイル使用メモリ | 175,024 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-09-04 04:14:17 |
| 合計ジャッジ時間 | 12,958 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
#![allow(unused_imports, dead_code, unused_macros, unused_variables, non_snake_case, unused_parens)]
use std::cmp::{min,max,Ordering,Reverse};
use std::mem::swap;
use std::collections::{VecDeque,LinkedList,HashMap,BTreeMap,HashSet,BTreeSet,BinaryHeap};
fn main() {
let n:i64= {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let r:f64= {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.trim().parse().unwrap()
};
let mut ans = 0.0;
let mut x = 100.0;
for _ in 0..n {
ans += x;
x *= 1.-r;
}
println!("{}", ans);
}
ikoma