結果
問題 |
No.2562 数字探しゲーム(緑以下コンver.)
|
ユーザー |
![]() |
提出日時 | 2023-12-15 14:04:35 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 631 bytes |
コンパイル時間 | 908 ms |
コンパイル使用メモリ | 93,788 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 21:40:26 |
合計ジャッジ時間 | 1,851 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 1 |
ソースコード
#include<iostream> #include<vector> #include<algorithm> using namespace std; using ll = long long; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int t; cin>>t; while(t--){ ll m; cin>>m; vector<int> d(10,0); for(int i = 1;i<=9;i++) cin>>d[i]; ll now = 0; for(int i = 1;i<=9;i++){ for(int j = 0;j<d[i];j++){ now = 10 * now + i; } } for(int i = 0;i<9;i++) now *= 10; ll tmp = now % m; ll want = m - tmp; want %= m; now += want; cout<<now<<endl; } }