結果

問題 No.1256 連続整数列
ユーザー marroncastlemarroncastle
提出日時 2020-10-16 21:57:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 297 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 87,284 KB
実行使用メモリ 75,588 KB
最終ジャッジ日時 2023-09-28 08:17:29
合計ジャッジ時間 2,992 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,216 KB
testcase_01 AC 63 ms
71,172 KB
testcase_02 AC 64 ms
75,440 KB
testcase_03 AC 66 ms
75,440 KB
testcase_04 AC 64 ms
71,384 KB
testcase_05 AC 64 ms
71,448 KB
testcase_06 AC 65 ms
75,572 KB
testcase_07 AC 67 ms
75,444 KB
testcase_08 AC 66 ms
75,304 KB
testcase_09 AC 62 ms
71,432 KB
testcase_10 AC 66 ms
75,316 KB
testcase_11 AC 64 ms
75,588 KB
testcase_12 AC 65 ms
75,376 KB
testcase_13 AC 64 ms
75,316 KB
testcase_14 AC 66 ms
75,212 KB
testcase_15 AC 65 ms
75,392 KB
testcase_16 AC 64 ms
75,412 KB
testcase_17 AC 66 ms
75,424 KB
testcase_18 AC 66 ms
75,440 KB
testcase_19 AC 65 ms
75,336 KB
testcase_20 AC 65 ms
75,396 KB
testcase_21 AC 65 ms
75,316 KB
testcase_22 AC 64 ms
75,320 KB
testcase_23 AC 64 ms
75,396 KB
testcase_24 AC 65 ms
75,332 KB
testcase_25 AC 64 ms
75,440 KB
権限があれば一括ダウンロードができます

ソースコード

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