結果

問題 No.2510 Six Cube Sum Counting
ユーザー 👑 timitimi
提出日時 2024-02-13 11:13:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 2,195 ms / 4,000 ms
コード長 327 bytes
コンパイル時間 340 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 440,412 KB
最終ジャッジ日時 2024-02-13 11:14:12
合計ジャッジ時間 69,636 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2,111 ms
396,500 KB
testcase_01 AC 2,117 ms
396,500 KB
testcase_02 AC 2,184 ms
440,404 KB
testcase_03 AC 2,133 ms
396,492 KB
testcase_04 AC 2,111 ms
396,492 KB
testcase_05 AC 2,113 ms
396,492 KB
testcase_06 AC 2,145 ms
396,588 KB
testcase_07 AC 2,121 ms
396,492 KB
testcase_08 AC 2,155 ms
396,528 KB
testcase_09 AC 2,149 ms
396,492 KB
testcase_10 AC 2,111 ms
396,492 KB
testcase_11 AC 2,176 ms
396,668 KB
testcase_12 AC 2,170 ms
396,656 KB
testcase_13 AC 2,176 ms
396,636 KB
testcase_14 AC 2,120 ms
396,500 KB
testcase_15 AC 2,136 ms
396,492 KB
testcase_16 AC 2,195 ms
396,492 KB
testcase_17 AC 2,107 ms
396,492 KB
testcase_18 AC 2,155 ms
396,492 KB
testcase_19 AC 2,129 ms
396,492 KB
testcase_20 AC 2,137 ms
440,296 KB
testcase_21 AC 2,136 ms
440,412 KB
testcase_22 AC 2,142 ms
440,364 KB
testcase_23 AC 2,120 ms
440,304 KB
testcase_24 AC 2,051 ms
440,296 KB
testcase_25 AC 2,151 ms
396,664 KB
testcase_26 AC 2,143 ms
396,576 KB
testcase_27 AC 2,075 ms
440,320 KB
testcase_28 AC 2,106 ms
396,492 KB
testcase_29 AC 2,110 ms
440,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

X=int(input())
D={};N=300;ans=0
A=[i**3 for i in range(N+1)]
for d in range(N+1):
  for b in range(d+1):
    for a in range(b+1):
      p=A[a]+A[b]+A[d]
      if p not in D:
        D[p]=0
      D[p]+=1
  for e in range(d,N+1):
    for f in range(e,N+1):
      p=X-(A[d]+A[e]+A[f])
      if p in D:
        ans+=D[p]
print(ans)
0