結果

問題 No.2562 数字探しゲーム(緑以下コンver.)
ユーザー nononnonon
提出日時 2023-12-02 18:51:52
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 522 bytes
コンパイル時間 2,335 ms
コンパイル使用メモリ 201,392 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2023-12-02 18:51:56
合計ジャッジ時間 3,476 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
ll T,M,d[10];
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cin>>T;
    for(;T--;)
    {
        cin>>M;
        for(int i=1;i<=9;i++)cin>>d[i];
        ll ans=0;
        for(int i=1;i<=9;i++)
        {
            for(int j=0;j<d[i];j++)
            {
                ans*=10;
                ans+=i;
            }
        }
        ans*=1e9;
        ans+=(M-ans%M);
        assert(ans<=1e18);
        cout << ans << endl;
    }
}
0