結果
| 問題 | No.3455 N-beatsu |
| コンテスト | |
| ユーザー |
U10
|
| 提出日時 | 2026-02-28 14:06:09 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| コード長 | 462 bytes |
| 記録 | |
| コンパイル時間 | 1,854 ms |
| コンパイル使用メモリ | 170,760 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-28 14:06:13 |
| 合計ジャッジ時間 | 3,168 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge7 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;
int main(){
int n, Q;
cin >> n >> Q;
string s;
s = to_string(n);
for(int i = 0; i < Q; i++) {
int k;
cin >> k;
string t;
t = to_string(k);
if(t.find(s) != string::npos || k % n == 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
return 0;
}
U10