結果

問題 No.2510 Six Cube Sum Counting
コンテスト
ユーザー wasd314
提出日時 2025-01-08 01:03:24
言語 PyPy3
(8.0.0 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 2,230 ms / 4,000 ms
+ 370µs
コード長 351 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,689 ms
コンパイル使用メモリ 64,532 KB
実行使用メモリ 356,368 KB
最終ジャッジ日時 2026-10-21 04:37:47
合計ジャッジ時間 71,158 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge6_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

x = int(input())

m = 301
from collections import Counter
import itertools as it
ans = 0
co = Counter()
for c in range(m)[::-1]:
    for e, f in it.combinations_with_replacement(range(c, m), 2):
        co[c**3 + e**3 + f**3] += 1
    for a, b in it.combinations_with_replacement(range(c + 1), 2):
        ans += co[x - a**3 - b**3 - c**3]
print(ans)
0