結果
| 問題 |
No.1915 Addition
|
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-09-21 10:29:13 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 609 bytes |
| コンパイル時間 | 1,927 ms |
| コンパイル使用メモリ | 194,096 KB |
| 最終ジャッジ日時 | 2025-02-16 23:50:41 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 9 |
ソースコード
#include <bits/stdc++.h>
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using ll = long long;
using namespace std;
int main()
{
ll t, a, b, j;
string n;
cin >> t;
for (ll i = 0; i < t; i++) {
cin >> n;
j = stoll(n);
while (j < 1e18){
a = stoll(n) + j;
b = stoll(n)*pow(10, to_string(j).size()) + j;
if (!(b%a)){
cout << j << endl;
break;
} else j += stoll(n);
}
}
}
kpinkcat