結果

問題 No.1915 Addition
ユーザー GrayCoder
提出日時 2022-04-29 22:59:21
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
RE  
実行時間 -
コード長 358 bytes
コンパイル時間 534 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-29 04:36:38
合計ジャッジ時間 2,185 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other RE * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
        for i in count(1):
            ans = m * i
            if not int(N + str(ans)) % (int(N) + ans):
                break
        print(ans)


main()
0