結果
| 問題 |
No.1915 Addition
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-04-29 22:12:17 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 314 bytes |
| コンパイル時間 | 353 ms |
| コンパイル使用メモリ | 7,168 KB |
| 実行使用メモリ | 19,356 KB |
| 最終ジャッジ日時 | 2024-06-29 03:41:28 |
| 合計ジャッジ時間 | 3,896 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 9 |
コンパイルメッセージ
Syntax OK
ソースコード
t = gets.to_i
t.times do
c = gets.to_i
cs = c.to_s
i = 11
j = 11
while true
if i % 9 == 0
i = i.to_s + '9'
j = ('1' * i.size).to_i
i = i.to_i/9
end
x = 1
x = i - c if i > c
if (cs + x.to_s).to_i % (c + x) == 0
puts x
break
end
i += j
end
end