結果

問題 No.2125 Inverse Sum
ユーザー u_kunu_kun
提出日時 2022-11-18 22:12:30
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 81,748 KB
実行使用メモリ 59,692 KB
最終ジャッジ日時 2023-10-20 07:03:19
合計ジャッジ時間 63,635 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,646 ms
57,476 KB
testcase_01 AC 1,835 ms
57,476 KB
testcase_02 AC 1,847 ms
57,476 KB
testcase_03 AC 1,844 ms
57,552 KB
testcase_04 AC 1,842 ms
57,476 KB
testcase_05 WA -
testcase_06 AC 1,843 ms
59,536 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 1,806 ms
57,476 KB
testcase_10 AC 1,801 ms
57,476 KB
testcase_11 AC 1,843 ms
57,476 KB
testcase_12 AC 1,841 ms
57,476 KB
testcase_13 AC 1,865 ms
59,552 KB
testcase_14 AC 1,871 ms
59,552 KB
testcase_15 AC 1,869 ms
59,552 KB
testcase_16 AC 1,874 ms
59,552 KB
testcase_17 AC 1,877 ms
59,552 KB
testcase_18 AC 1,845 ms
59,536 KB
testcase_19 AC 1,873 ms
59,552 KB
testcase_20 AC 1,860 ms
59,552 KB
testcase_21 AC 1,863 ms
59,552 KB
testcase_22 AC 1,864 ms
59,552 KB
testcase_23 AC 1,809 ms
57,476 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 1,758 ms
57,476 KB
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 1,847 ms
57,476 KB
testcase_31 WA -
testcase_32 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

P, Q = map(int, input().split())

ans_list = []

for M in range(1, 10 ** 8):
    if Q - P * M != 0:
        if (-M * Q) % (Q - P * M) == 0:
            N = (-M * Q) // (Q - P * M)
            if N > 0:
                ans_list.append((N, M))

ans_list.sort()

print(len(ans_list))
for t in ans_list:
    print(*t)
    
0