結果
| 問題 |
No.2562 数字探しゲーム(緑以下コンver.)
|
| コンテスト | |
| ユーザー |
Jikky1618
|
| 提出日時 | 2025-09-03 08:24:07 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 622 bytes |
| コンパイル時間 | 3,325 ms |
| コンパイル使用メモリ | 279,444 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-03 08:24:15 |
| 合計ジャッジ時間 | 5,281 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug.hpp>
#else
#define debug(...)
#endif
void solve() {
int M;
vector<int> d(9);
cin >> M;
for (int i = 0; i < 9; i++) cin >> d[i];
string tmp = "";
for (int i = 0; i < 9; i++) tmp += string(d[i], i + '1');
tmp += string(9, '0');
debug(tmp);
ll ans = stoll(tmp);
ans += (ans % M ? M - (ans % M) : 0);
cout << ans << '\n';
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
int T;
cin >> T;
while (T--) solve();
}
Jikky1618