結果

問題 No.2510 Six Cube Sum Counting
ユーザー vwxyzvwxyz
提出日時 2023-11-30 19:45:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,755 ms / 4,000 ms
コード長 1,187 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 445,352 KB
最終ジャッジ日時 2023-11-30 19:46:55
合計ジャッジ時間 52,270 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,610 ms
445,232 KB
testcase_01 AC 1,624 ms
445,216 KB
testcase_02 AC 1,665 ms
445,348 KB
testcase_03 AC 1,755 ms
417,520 KB
testcase_04 AC 1,627 ms
417,528 KB
testcase_05 AC 1,620 ms
417,536 KB
testcase_06 AC 1,657 ms
417,720 KB
testcase_07 AC 1,675 ms
417,528 KB
testcase_08 AC 1,632 ms
417,720 KB
testcase_09 AC 1,614 ms
417,528 KB
testcase_10 AC 1,630 ms
417,528 KB
testcase_11 AC 1,631 ms
417,532 KB
testcase_12 AC 1,624 ms
417,544 KB
testcase_13 AC 1,679 ms
417,544 KB
testcase_14 AC 1,613 ms
417,660 KB
testcase_15 AC 1,635 ms
417,528 KB
testcase_16 AC 1,644 ms
417,528 KB
testcase_17 AC 1,648 ms
417,528 KB
testcase_18 AC 1,639 ms
417,520 KB
testcase_19 AC 1,656 ms
417,536 KB
testcase_20 AC 1,673 ms
445,216 KB
testcase_21 AC 1,620 ms
445,268 KB
testcase_22 AC 1,604 ms
445,340 KB
testcase_23 AC 1,659 ms
445,216 KB
testcase_24 AC 1,621 ms
445,232 KB
testcase_25 AC 1,633 ms
417,552 KB
testcase_26 AC 1,635 ms
417,716 KB
testcase_27 AC 1,582 ms
445,340 KB
testcase_28 AC 1,617 ms
417,532 KB
testcase_29 AC 1,576 ms
445,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
import copy
import decimal
import fractions
import heapq
import itertools
import math
import random
import sys
import time
from collections import Counter,deque,defaultdict
from functools import lru_cache,reduce
from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max
def _heappush_max(heap,item):
    heap.append(item)
    heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappushpop_max(heap, item):
    if heap and item < heap[0]:
        item, heap[0] = heap[0], item
        heapq._siftup_max(heap, 0)
    return item
from math import gcd as GCD
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines
write=sys.stdout.write
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
#sys.set_int_max_str_digits(10**9)

N=300
X=int(readline())
C={}
ans=0
pow_3=[i**3 for i in range(N+1)]
for d in range(N+1):
    c=d
    for b in range(c+1):
        for a in range(b+1):
            abc3=pow_3[a]+pow_3[b]+pow_3[c]
            C[abc3]=C.get(abc3,0)+1
    for e in range(d,N+1):
        for f in range(e,N+1):
            def3=pow_3[d]+pow_3[e]+pow_3[f]
            ans+=C.get(X-(pow_3[d]+pow_3[e]+pow_3[f]),0)
print(ans)
0