結果
| 問題 | No.2562 数字探しゲーム(緑以下コンver.) | 
| コンテスト | |
| ユーザー |  momoyuu | 
| 提出日時 | 2023-12-15 14:04:06 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 612 bytes | 
| コンパイル時間 | 862 ms | 
| コンパイル使用メモリ | 93,908 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-11-19 21:40:26 | 
| 合計ジャッジ時間 | 2,584 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 1 WA * 9 | 
ソースコード
#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;
        now += want;
        cout<<now<<endl;
    }
}
            
            
            
        