結果
問題 |
No.1807 UMA Gacha
|
ユーザー |
![]() |
提出日時 | 2023-01-05 22:27:59 |
言語 | Rust (1.83.0 + proconio) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 373 bytes |
コンパイル時間 | 13,020 ms |
コンパイル使用メモリ | 378,108 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-29 14:27:33 |
合計ジャッジ時間 | 13,412 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 21 |
ソースコード
use std::io::Read; fn main() { let mut np = String::new(); std::io::stdin().read_to_string(&mut np).ok(); let mut itr = np.trim().split_whitespace(); let n: i32 = itr.next().unwrap().parse().unwrap(); let p: f64 = itr.next().unwrap().parse().unwrap(); let ans = if n >= 200 { 1.to_string() } else { (1. - (1. - p).powi(n)).to_string() }; println!("{}", ans); }