結果

問題 No.211 素数サイコロと合成数サイコロ (1)
コンテスト
ユーザー cra77756176
提出日時 2022-11-30 00:04:42
言語 Rust
(1.94.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
WA  
実行時間 -
コード長 450 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 952 ms
コンパイル使用メモリ 191,512 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-24 01:21:34
合計ジャッジ時間 2,251 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 30 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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