結果
| 問題 |
No.2562 数字探しゲーム(緑以下コンver.)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-11-21 22:52:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 496 bytes |
| コンパイル時間 | 2,233 ms |
| コンパイル使用メモリ | 192,348 KB |
| 最終ジャッジ日時 | 2025-02-25 05:49:13 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
while(T--){
int m;
cin >> m;
ll d = 1'000'000'000ll, ans = 0;
for(int i = 1; i < 10; i++){
int c;
cin >> c;
while(c--){
ans += d * i;
d *= 10;
}
}
ans += (m - ans % m) % m;
cout << ans << '\n';
}
}