結果
| 問題 | 
                            No.1915 Addition 
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-07-15 18:50:36 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,144 bytes | 
| コンパイル時間 | 3,997 ms | 
| コンパイル使用メモリ | 251,492 KB | 
| 実行使用メモリ | 15,948 KB | 
| 最終ジャッジ日時 | 2025-07-15 18:50:44 | 
| 合計ジャッジ時間 | 7,605 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | TLE * 1 -- * 9 | 
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = vector<ll>;
using vvi = vector<vi>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vs = vector<string>;
using pii = pair<ll, ll>;
using vpii = vector<pii>;
using mint = modint998244353;
// using mint = modint1000000007;
#define endl '\n'
#define rep(i, a) for (ll i = 0; i < a; i++)
#define f(i, a, b) for (ll i = a; i < b; i++)
#define rf(i, a, b) for (ll i = a; i > b; i--)
const ll INF = LLONG_MAX / 4;
void io_setup() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(16);
}
int main(void) {
    io_setup();
    ll t;
    cin >> t;
    rep(T,t) {
        int n;
        cin >> n;
        f(i, 1,n) {
            ll k = i;
            ll s = n;
            while (k > 0) {
                k /= 10;
                s *= 10;
            }
            if ((s + i) % (n + i) == 0) {
                cout << i << endl;
                break;
            }
        }
    }
}