結果
| 問題 | No.1256 連続整数列 |
| コンテスト | |
| ユーザー |
toshiro_yanagi
|
| 提出日時 | 2022-07-03 21:55:58 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 518 bytes |
| 記録 | |
| コンパイル時間 | 501 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 23,200 KB |
| 最終ジャッジ日時 | 2026-05-23 13:19:39 |
| 合計ジャッジ時間 | 4,704 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 1 TLE * 1 -- * 37 |
ソースコード
from collections import deque
bufio_scanner = []
def main():
a = int(fmt_scan())
s = 0
ans = "NO"
q = deque()
for i in range(int(a / 3) + 1, 0, -1):
q.append(i)
s += i
if s > a:
s -= q.popleft()
if s == a:
ans = "YES"
break
print(ans)
def fmt_scan() -> str:
sc = bufio_scanner
if len(sc) == 0:
for v in input().split()[::-1]:
sc.append(v)
res = sc[-1]
sc.pop()
return res
main()
toshiro_yanagi