結果
| 問題 |
No.3331 Consecutive Cubic Sum
|
| コンテスト | |
| ユーザー |
wgrape
|
| 提出日時 | 2025-11-10 16:55:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 269 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 82,660 KB |
| 実行使用メモリ | 337,300 KB |
| 最終ジャッジ日時 | 2025-11-10 16:55:29 |
| 合計ジャッジ時間 | 20,113 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 22 WA * 25 |
ソースコード
N = int(input())
T = [0]
i = 1
while True:
if i ** 3 > N:
break
T.append(T[-1] + i ** 3)
i += 1
M = len(T)
dic = {}
ans = []
for i in range(M):
if N - T[i] in dic:
ans.append([dic[N - T[i]] + 1, i])
dic[T[i]] = i
print(len(ans))
for a in ans:
print(a)
wgrape