結果
| 問題 | No.3455 N-beatsu |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-02-28 13:45:43 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 494 bytes |
| 記録 | |
| コンパイル時間 | 3,216 ms |
| コンパイル使用メモリ | 333,892 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-02-28 13:45:48 |
| 合計ジャッジ時間 | 4,336 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
int n,q;
cin>>n>>q;
int t=1;
while(t<=n)t*=10;
while(q--){
int x;
cin>>x;
if(x%n==0){
cout<<"Yes"<<endl;
}else{
while(x){
if(x%t==n){
cout<<"Yes"<<endl;
break;
}
x/=10;
if(!x)cout<<"No"<<endl;
}
}
}
return 0;
}