結果
問題 |
No.1915 Addition
|
ユーザー |
|
提出日時 | 2022-04-29 21:54:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 727 bytes |
コンパイル時間 | 2,860 ms |
コンパイル使用メモリ | 159,620 KB |
最終ジャッジ日時 | 2025-01-28 22:48:21 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 9 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <utility> #include <map> #include <set> #include <queue> #include <iomanip> #include <cstring> #include <atcoder/all> using namespace std; using namespace atcoder; typedef long long ll; #define rep(i,n) for (int i = 0; i < int(n);i++) int main(){ int tt; cin >> tt; while(tt--){ int n; cin >> n; int m = n; while(true){ //printf("(n,m) = (%d,%d)\n",n,m); int x = m; int sn = n; while(x > 0){ x/=10; sn *= 10; } if ((sn+m)%(n+m) == 0){ //printf("(n,m) = (%d,%d)\n",n,m); cout << m << endl; break; } m += n; } } return 0; }