結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー cra77756176
提出日時 2022-11-30 00:04:42
言語 Rust
(1.83.0 + proconio)
結果
WA  
実行時間 -
コード長 450 bytes
コンパイル時間 12,831 ms
コンパイル使用メモリ 394,972 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-07 09:01:17
合計ジャッジ時間 14,595 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

use std::{collections::HashSet, io};

fn main() {
    let mut n = String::new();
    io::stdin().read_line(&mut n).ok();
    let n = n.trim().parse::<u64>().unwrap();

    let mut possible = HashSet::new();
    for p in [2, 3, 5, 7, 11, 13] {
        for c in [4, 6, 8, 9, 10, 12] {
            possible.insert(p * c);
        }
    }

    if possible.contains(&n) {
        println!("{}", 36f64.recip());
    } else {
        println!("0");
    }
}
0