結果
問題 |
No.1915 Addition
|
ユーザー |
|
提出日時 | 2022-04-29 22:22:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 605 bytes |
コンパイル時間 | 832 ms |
コンパイル使用メモリ | 98,116 KB |
実行使用メモリ | 13,752 KB |
最終ジャッジ日時 | 2024-06-29 03:56:56 |
合計ジャッジ時間 | 4,448 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 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 << a << " " << n+i <<" "<< n << " " << i<<endl; break; } i++; } } }