結果
問題 | No.2562 数字探しゲーム(緑以下コンver.) |
ユーザー |
![]() |
提出日時 | 2023-12-02 18:55:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 548 bytes |
コンパイル時間 | 1,995 ms |
コンパイル使用メモリ | 191,684 KB |
最終ジャッジ日時 | 2025-02-18 06:11:50 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 9 |
ソースコード
#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); assert(ans%M==0); cout << ans << endl; } }