結果
| 問題 |
No.2767 Add to Divide
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-05-31 22:02:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 352 bytes |
| コンパイル時間 | 326 ms |
| コンパイル使用メモリ | 82,372 KB |
| 実行使用メモリ | 81,852 KB |
| 最終ジャッジ日時 | 2024-12-20 23:26:24 |
| 合計ジャッジ時間 | 11,878 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 TLE * 3 |
ソースコード
for _ in range(int(input())):
a,b=map(int,input().split())
if b%a==0:
print(0)
elif b//a==1:
print(-1)
else:
T=True
for i in reversed(range(2,b//a+1)):
if b%(i-1)==a%(i-1):
print((b-a*i)//(i-1))
T=False
break
if T:
print(-1)