結果
問題 |
No.1915 Addition
|
ユーザー |
|
提出日時 | 2022-04-29 22:24:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 616 bytes |
コンパイル時間 | 754 ms |
コンパイル使用メモリ | 97,380 KB |
実行使用メモリ | 13,760 KB |
最終ジャッジ日時 | 2024-06-29 03:58:58 |
合計ジャッジ時間 | 4,207 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | TLE * 1 -- * 9 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <map> #include <set> #include <fstream> #include <cmath> #include <stack> #include <queue> #include <iomanip> #include <bitset> using namespace std; int main(){ int t;cin>>t; for(int cas =0;cas<t;cas++){ int n; cin>>n; string pr = to_string(n); long long i = 1; while(1){ string br = to_string(i); long long a = stoll(pr+br); if(a%(n+i)==0) { cout << i<<endl; break; } i++; } } }