結果
| 問題 | No.3331 Consecutive Cubic Sum |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-11-02 21:23:10 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 243 bytes |
| 記録 | |
| コンパイル時間 | 850 ms |
| コンパイル使用メモリ | 82,840 KB |
| 実行使用メモリ | 176,032 KB |
| 最終ジャッジ日時 | 2025-11-02 21:27:06 |
| 合計ジャッジ時間 | 30,358 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 47 |
ソースコード
N=int(input())
h=[0]
c=0
for x in range(1,10**6+1):
if x**3>N:
break
c+=x**3
h.append(c)
from bisect import bisect_right
c=0
for x in range(1,10**6+1):
y=c+N
pos=bisect_right(h,y)
if h[pos-1]==y:
print(x,pos-1)
c+=x**3
ゼット