結果

問題 No.2358 xy+yz+zx=N
ユーザー ああいいああいい
提出日時 2023-07-01 19:46:41
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 376 bytes
コンパイル時間 839 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 79,336 KB
最終ジャッジ日時 2023-09-22 13:56:20
合計ジャッジ時間 5,533 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

ans = []
num = 0
for x in range(N + 1):
    for y in range(N + 1):
        t = x * y
        if t > N:break
        if t == N:
            ans.append((x,y,0))
            num += 1
        else:
            if (N - t) % (x +  y) == 0:
                num += 1
                ans.append((x,y,(N - t) // (x + y)))
print(num)
for x,y,z in ans:
    print(x,y,z)
0