結果
問題 | No.2562 数字探しゲーム(緑以下コンver.) |
ユーザー |
|
提出日時 | 2025-01-12 15:19:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 412 bytes |
コンパイル時間 | 2,142 ms |
コンパイル使用メモリ | 191,176 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-12 15:19:59 |
合計ジャッジ時間 | 4,583 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 9 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long; void solve(){ ll x=0; ll M; cin>>M; for(int i=0;i<9;i++){ int d; cin>>d; while(d--){ x=(x*10+i+1); } } x*=ll(1e9); x+=(M-(x%M)); cout<<x<<endl; } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); ll T; cin>>T; while(T--) solve(); }