結果
| 問題 |
No.2562 数字探しゲーム(緑以下コンver.)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-12-02 14:58:53 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 885 bytes |
| コンパイル時間 | 841 ms |
| コンパイル使用メモリ | 91,524 KB |
| 最終ジャッジ日時 | 2025-02-18 04:07:21 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 10 |
ソースコード
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <utility>
#include <string>
#include <queue>
#include <stack>
using namespace std;
typedef long long int ll;
typedef pair<int, int> Pii;
const ll mod = 998244353;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int t;
cin >> t;
vector<ll> m(t);
vector<vector<ll>> d(t, vector<ll>(9));
for (int i = 0; i < t; i++) {
cin >> m[i];
for (auto &dn: d[i]) cin >> dn;
}
vector<ll> ans(t);
for (int i = 0; i < t; i++) {
ll mult_1e9 = 0;
for (int j = 0; j < 9; j++) {
for (int k = 0; k < d[i][j]; k++) {
mult_1e9 = mult_1e9 * 10 + (j + 1);
}
}
ll ans_hi = mult_1e9 * 1000000000LL;
ll ans_lo = (m[i] - ans_hi % m[i]) % 1000000000LL;
ans.push_back(ans_hi + ans_lo);
}
for (auto &x: ans) cout << x << endl;
return 0;
}