結果
問題 | No.2562 数字探しゲーム(緑以下コンver.) |
ユーザー |
|
提出日時 | 2025-01-12 15:21:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 431 bytes |
コンパイル時間 | 2,995 ms |
コンパイル使用メモリ | 191,440 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2025-01-12 15:21:09 |
合計ジャッジ時間 | 3,660 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 1 |
ソースコード
#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); if(M!=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(); }