結果

問題 No.2358 xy+yz+zx=N
ユーザー 2000 Ekiben2000 Ekiben
提出日時 2023-06-23 21:41:57
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 287 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 87,552 KB
最終ジャッジ日時 2024-07-01 17:27:54
合計ジャッジ時間 4,327 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
56,960 KB
testcase_01 AC 40 ms
51,456 KB
testcase_02 AC 46 ms
57,984 KB
testcase_03 AC 42 ms
51,712 KB
testcase_04 AC 42 ms
51,328 KB
testcase_05 AC 41 ms
51,584 KB
testcase_06 AC 69 ms
61,056 KB
testcase_07 TLE -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
results = []
for x in range(N+1):
    for y in range(N+1):
        if x + y == 0:
            continue
        z = N - x*y
        if z >= 0 and z % (x+y) == 0:
            results.append((x, y, z // (x+y)))
print(len(results))
for result in results:
    print(*result)
0