結果
問題 | No.2516 Credit Creation |
ユーザー |
|
提出日時 | 2024-07-22 11:50:54 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 271 bytes |
コンパイル時間 | 14,275 ms |
コンパイル使用メモリ | 383,504 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 11:51:11 |
合計ジャッジ時間 | 15,286 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
use std::io::Read;fn main() {let mut s = String::new();std::io::stdin().read_to_string(&mut s).ok();let n: Vec<f64> = s.split_whitespace().flat_map(str::parse).collect();println!("{}",(0..n[0] as i32).fold(0., |a, i| a + 100. * (1. - n[1]).powi(i)));}