結果

問題 No.2510 Six Cube Sum Counting
ユーザー 👑 amentorimaruamentorimaru
提出日時 2023-09-21 20:23:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
MLE  
実行時間 -
コード長 558 bytes
コンパイル時間 376 ms
コンパイル使用メモリ 11,896 KB
実行使用メモリ 679,864 KB
最終ジャッジ日時 2023-10-19 16:29:11
合計ジャッジ時間 15,757 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

import sys
input = sys.stdin.readline
import numpy

def main():
    n=int(input())
    d=[0]*81000001
    ans = 0
    for m0 in range(0,301):
        for m1 in range(0,m0+1):
            for m2 in range(m1,m0+1):
                d[m0*m0*m0+m1*m1*m1+m2*m2*m2]+=1
        for m1 in range(m0, 301):
            for m2 in range(m1, 301):
                v = n-m0*m0*m0-m1*m1*m1-m2*m2*m2
                if v < 0:
                    break
                elif v <= 81000000:
                    ans+=d[v]
    print(ans)
    
if __name__ == "__main__":
    main()
0