結果

問題 No.3037 トグルトグルトグル!
ユーザー Blue_S
提出日時 2025-01-08 23:31:30
言語 Rust
(1.83.0 + proconio)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 356 bytes
コンパイル時間 15,569 ms
コンパイル使用メモリ 404,660 KB
実行使用メモリ 129,540 KB
最終ジャッジ日時 2025-01-17 23:05:16
合計ジャッジ時間 17,512 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 8 RE * 3 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

use proconio::input;

fn main() {
    input! {
        n: usize,
    }

    let mut is_stand = vec![false; n + 1];
    for i in 1..=n {
        for j in 1.. {
            if i * j > n {
                break;
            }
            is_stand[i * j] = !is_stand[i * j];
        }
    }

    println!("{}", is_stand[1..].iter().filter(|x| **x).count());
}
0