結果
| 問題 | No.1915 Addition | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-04-29 23:02:26 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 364 bytes | 
| コンパイル時間 | 760 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 17,568 KB | 
| 最終ジャッジ日時 | 2024-06-29 04:40:36 | 
| 合計ジャッジ時間 | 3,721 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | TLE * 1 -- * 9 | 
ソースコード
from itertools import count
from sys import stdin
def main():
    input = lambda: stdin.readline()[:-1]
    T = int(input())
    for _ in [0] * T:
        N = input()
        m = 9 - (sum(map(int, N)) % 9)
        for i in count(1):
            ans = m * i
            if not int(N + str(ans)) % (int(N) + ans):
                break
        print(ans)
main()
            
            
            
        