結果

問題 No.1915 Addition
ユーザー ei1333333ei1333333
提出日時 2022-04-29 21:22:15
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 319 bytes
コンパイル時間 4,729 ms
コンパイル使用メモリ 260,628 KB
実行使用メモリ 11,480 KB
最終ジャッジ日時 2023-09-11 12:11:11
合計ジャッジ時間 8,431 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#include<atcoder/all>

using namespace std;

using int64 = long long;

int main() {
  int T;
  cin >> T;
  while(T--) {
    int N;
    cin >> N;
    for(int i = 1;; i++) {
      if(stoll(to_string(N) + to_string(i)) % (N + i) == 0) {
        cout << i << "\n";
        break;
      }
    }
  }
}
0