結果
| 問題 |
No.2510 Six Cube Sum Counting
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-08 01:03:24 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 3,481 ms / 4,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 796 ms |
| コンパイル使用メモリ | 82,268 KB |
| 実行使用メモリ | 399,308 KB |
| 最終ジャッジ日時 | 2025-01-08 01:05:32 |
| 合計ジャッジ時間 | 96,568 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
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)