結果

問題 No.2358 xy+yz+zx=N
ユーザー ゼットゼット
提出日時 2024-02-17 09:21:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 382 bytes
コンパイル時間 347 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 81,048 KB
最終ジャッジ日時 2024-02-17 09:21:30
合計ジャッジ時間 13,112 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
53,460 KB
testcase_01 AC 35 ms
53,460 KB
testcase_02 AC 34 ms
53,460 KB
testcase_03 AC 32 ms
53,460 KB
testcase_04 AC 32 ms
53,460 KB
testcase_05 AC 32 ms
53,460 KB
testcase_06 AC 40 ms
61,976 KB
testcase_07 AC 62 ms
70,644 KB
testcase_08 TLE -
testcase_09 TLE -
testcase_10 TLE -
testcase_11 TLE -
testcase_12 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
result=[]
for x in range(1,N):
  for y in range(1,N):
    if x*y>=N:
      break
    k=N-x*y
    if k%(x+y)==0:
      z=k//(x+y)
      result.append((x,y,z))
for a in range(1,N+1):
  if N%a==0:
    result.append((0,a,N//a))
    result.append((a,0,N//a))
    result.append((a,N//a,0))
print(len(result))
for i in range(len(result)):
  a,b,c=result[i][:]
  print(a,b,c)
0