結果
問題 | No.2562 数字探しゲーム(緑以下コンver.) |
ユーザー |
|
提出日時 | 2023-12-02 14:50:44 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 440 bytes |
コンパイル時間 | 2,056 ms |
コンパイル使用メモリ | 193,780 KB |
最終ジャッジ日時 | 2025-02-18 03:59:18 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 RE * 1 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){ios_base::sync_with_stdio(false);cin.tie(nullptr);int test; cin >> test;while(test--){long long M; cin >> M;string s = "";for(int i=1; i<=9; i++){int d; cin >> d;while(d--) s += '0'+i;}long long D = stoll(s);D *= 1e9;D += (M-D%M)%M;cout << D << endl;}}