結果
| 問題 |
No.3331 Consecutive Cubic Sum
|
| コンテスト | |
| ユーザー |
detteiuu
|
| 提出日時 | 2025-11-02 21:25:32 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 947 ms / 5,000 ms |
| コード長 | 245 bytes |
| コンパイル時間 | 276 ms |
| コンパイル使用メモリ | 82,576 KB |
| 実行使用メモリ | 287,136 KB |
| 最終ジャッジ日時 | 2025-11-02 21:27:59 |
| 合計ジャッジ時間 | 48,698 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 47 |
ソースコード
N = int(input())
cum = [0]
D = dict()
D[0] = 0
ans = []
for i in range(1, 10**6+1):
cum.append(cum[-1]+i**3)
if cum[-1]-N in D:
ans.append((D[cum[-1]-N]+1, i))
D[cum[-1]] = i
print(len(ans))
for l, r in ans:
print(l, r)
detteiuu