結果

問題 No.1256 連続整数列
ユーザー marroncastle
提出日時 2020-10-16 21:57:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 182 ms
コンパイル使用メモリ 82,816 KB
実行使用メモリ 57,600 KB
最終ジャッジ日時 2025-06-20 10:43:06
合計ジャッジ時間 2,687 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 40
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisor(n):
  cd = []
  i = 1
  while i*i <= n:
    if n%i==0:
      cd.append(i)
      if i != n//i:
        cd.append(n//i)
    i += 1
  return cd

A = int(input())
for x in divisor(2*A):
  if x<3:
    continue
  y = 2*A//x
  if (y+1-x)%2==0:
    print('YES')
    break
else:
  print('NO')

0