結果

問題 No.2510 Six Cube Sum Counting
ユーザー vwxyzvwxyz
提出日時 2023-11-30 19:43:39
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 1,116 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 581,640 KB
最終ジャッジ日時 2023-11-30 19:45:29
合計ジャッジ時間 104,494 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 MLE -
testcase_01 MLE -
testcase_02 MLE -
testcase_03 MLE -
testcase_04 MLE -
testcase_05 MLE -
testcase_06 MLE -
testcase_07 MLE -
testcase_08 MLE -
testcase_09 MLE -
testcase_10 MLE -
testcase_11 MLE -
testcase_12 MLE -
testcase_13 MLE -
testcase_14 MLE -
testcase_15 MLE -
testcase_16 MLE -
testcase_17 MLE -
testcase_18 MLE -
testcase_19 MLE -
testcase_20 MLE -
testcase_21 MLE -
testcase_22 MLE -
testcase_23 MLE -
testcase_24 MLE -
testcase_25 MLE -
testcase_26 MLE -
testcase_27 MLE -
testcase_28 MLE -
testcase_29 MLE -
権限があれば一括ダウンロードができます

ソースコード

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=defaultdict(int)
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):
            C[pow_3[a]+pow_3[b]+pow_3[c]]+=1
    for e in range(d,N+1):
        for f in range(e,N+1):
            ans+=C[X-(pow_3[d]+pow_3[e]+pow_3[f])]
print(ans)
0