結果
| 問題 | No.2562 数字探しゲーム(緑以下コンver.) | 
| コンテスト | |
| ユーザー |  ゆにぽけ | 
| 提出日時 | 2023-12-02 17:04:01 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                            (最新) 
                                AC
                                 
                            (最初) | 
| 実行時間 | - | 
| コード長 | 704 bytes | 
| コンパイル時間 | 1,242 ms | 
| コンパイル使用メモリ | 121,864 KB | 
| 最終ジャッジ日時 | 2025-02-18 05:52:28 | 
| ジャッジサーバーID (参考情報) | judge5 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 9 WA * 1 | 
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cassert>
#include<cmath>
#include<ctime>
#include<iomanip>
#include<numeric>
#include<stack>
#include<queue>
#include<map>
#include<unordered_map>
#include<set>
#include<unordered_set>
#include<bitset>
#include<random>
#include<functional>
#include<utility>
using namespace std;
void solve()
{
	int M;
	cin >> M;
	long long ans = 0;
	for(int i = 1;i <= 9;i++)
	{
		int d;
		cin >> d;
		for(;d--;) ans = ans*10 + i;
	}
	ans *= (int)1e9;
	if(ans%M == 0);
	else
	{
		ans += M - ans%M;
	}
	cout << ans << "\n";
}
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	int tt = 1;
	cin >> tt;
	while(tt--) solve();
}
            
            
            
        