結果

問題 No.3455 N-beatsu
コンテスト
ユーザー QiToY
提出日時 2026-02-28 13:41:41
言語 Rust
(1.93.0 + proconio + num + itertools)
コンパイル:
/usr/bin/rustc_custom
実行:
./target/release/main
結果
AC  
実行時間 11 ms / 2,000 ms
コード長 1,016 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,781 ms
コンパイル使用メモリ 209,084 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2026-02-28 13:41:45
合計ジャッジ時間 3,595 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#![allow(unused_imports)]

fn main() {
    input! {
        n: usize, q: usize,
        x: [usize; q],
    }
    println!("{}", x.into_iter().map(|x| {
        if x.is_multiple_of(n) || x.to_string().contains(&n.to_string()) { "Yes" } else { "No" }
        
    }).join("\n"));
}

use proconio::{input, marker::*};
use itertools::{iproduct, izip, Itertools as _};
use std::{cmp::Reverse, collections::*};

#[macro_export]
macro_rules! chmax {
    ($a:expr, $b:expr) => {{
        let tmp = $b;
        if $a < tmp {
            $a = tmp;
            true
        } else {
            false
        }
    }};
}

#[macro_export]
macro_rules! chmin {
    ($a:expr, $b:expr) => {{
        let tmp = $b;
        if $a > tmp {
            $a = tmp;
            true
        } else {
            false
        }
    }};
}

#[macro_export]
/// mvec![]
macro_rules! mvec {
    ($val:expr; ()) => {
        $val
    };
    ($val:expr; ($size:expr $(,$rest:expr)*)) => {
        vec![mvec![$val; ($($rest),*)]; $size]
    };
}
0