結果

問題 No.1256 連続整数列
ユーザー marroncastlemarroncastle
提出日時 2020-10-16 21:53:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 295 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 86,980 KB
実行使用メモリ 75,648 KB
最終ジャッジ日時 2023-09-28 06:56:58
合計ジャッジ時間 2,928 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,252 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 64 ms
75,320 KB
testcase_04 WA -
testcase_05 AC 65 ms
71,440 KB
testcase_06 AC 63 ms
75,444 KB
testcase_07 AC 63 ms
75,648 KB
testcase_08 AC 63 ms
75,288 KB
testcase_09 AC 60 ms
71,292 KB
testcase_10 AC 62 ms
75,496 KB
testcase_11 AC 63 ms
75,324 KB
testcase_12 AC 63 ms
75,396 KB
testcase_13 AC 64 ms
75,484 KB
testcase_14 WA -
testcase_15 AC 64 ms
75,516 KB
testcase_16 WA -
testcase_17 AC 64 ms
75,416 KB
testcase_18 AC 64 ms
75,496 KB
testcase_19 AC 65 ms
75,400 KB
testcase_20 AC 64 ms
75,396 KB
testcase_21 AC 65 ms
75,436 KB
testcase_22 AC 62 ms
75,400 KB
testcase_23 AC 64 ms
75,484 KB
testcase_24 AC 63 ms
75,404 KB
testcase_25 AC 65 ms
75,392 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 = A//x
  if (x-y+1)%2==0:
    print('YES')
    break
else:
  print('NO')

0