結果

問題 No.1807 UMA Gacha
コンテスト
ユーザー phspls
提出日時 2022-09-28 23:52:44
言語 Rust
(1.99.0 + proconio + num + itertools + ACL)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 0 ms / 2,000 ms
+ 870µs
コード長 370 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 362 ms
コンパイル使用メモリ 183,428 KB
実行使用メモリ 9,876 KB
最終ジャッジ日時 2026-10-06 02:19:02
合計ジャッジ時間 2,335 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

fn main() {
    let mut n = String::new();
    std::io::stdin().read_line(&mut n).ok();
    let n: usize = n.trim().parse().unwrap();
    let mut p = String::new();
    std::io::stdin().read_line(&mut p).ok();
    let p: f64 = p.trim().parse().unwrap();

    if n >= 200 {
        println!("1");
        return;
    }
    println!("{}", 1. - (1. - p).powf(n as f64));
}
0