시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 654 73 28 11.382%

문제

동규부동산에서 아파트를 임대하고 있다. 아파트의 방은 아래 그림과 같이 면적이 2xy + x + y이다. (x와 y는 양의 정수)

동규부동산의 카탈로그에는 아파트의 면적이 오름차순으로 적혀져 있지만, 이 중 일부는 있을 수 없는 크기의 아파트이다. 만약, 이런 크기의 아파트를 임대하겠다고 말하면, 동규는 꽝! 이라고 외치면서, 수수료만 떼어간다.

동규부동산의 카탈로그에 적힌 아파트의 면적이 주어졌을 때, 있을 수 없는 크기의 아파트가 몇 개 인지 구하는 프로그램을 작성하시오.

입력

첫째 줄에 아파트의 면적의 수 N이 주어진다. 다음 줄부터 N개 줄에 카탈로그에 적혀있는 순서대로 면적이 주어진다. N은 100,000이하이고 면적은 231-1이하이다.

출력

첫째 줄에 있을 수 없는 아파트 면적의 수를 출력한다.

예제 입력 1

10
4
7
9
10
12
13
16
17
19
20

예제 출력 1

2

힌트

W3sicHJvYmxlbV9pZCI6IjU2MTUiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWM1NDRcdWQzMGNcdWQyYjggXHVjNzg0XHViMzAwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWIzZDlcdWFkZGNcdWJkODBcdWIzZDlcdWMwYjBcdWM1ZDBcdWMxMWMgXHVjNTQ0XHVkMzBjXHVkMmI4XHViOTdjIFx1Yzc4NFx1YjMwMFx1ZDU1OFx1YWNlMCBcdWM3ODhcdWIyZTQuIFx1YzU0NFx1ZDMwY1x1ZDJiOFx1Yzc1OCBcdWJjMjlcdWM3NDAgXHVjNTQ0XHViNzk4IFx1YWRmOFx1YjliY1x1YWNmYyBcdWFjMTlcdWM3NzQgXHViYTc0XHVjODAxXHVjNzc0IDJ4eSArIHggKyB5XHVjNzc0XHViMmU0LiAoeFx1YzY0MCB5XHViMjk0IFx1YzU5MVx1Yzc1OCBcdWM4MTVcdWMyMTgpPFwvcD5cclxuXHJcblxyXG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iXHUzMDRhXHUzMDQ0XHUzMDY2XHUzMDZmXHVmZjBjIFx1NTFmYVx1NTI5Ylx1MzA2ZVx1NjcwMFx1NWY4Y1x1MzA2ZVx1ODg0Y1x1MzA2Ylx1MzA4Mlx1NjUzOVx1ODg0Y1x1MzBiM1x1MzBmY1x1MzBjOVx1MzA5Mlx1NTE2NVx1MzA4Y1x1MzA4Ylx1MzA1M1x1MzA2OFx1ZmYwZTxcL3A+XHJcbiIsImhpbnQiOiIiLCJvcmlnaW5hbCI6IjEiLCJwcm9ibGVtX2xhbmdfY29kZSI6Ilx1Yzc3Y1x1YmNmOFx1YzViNCJ9XQ==

출처

Olympiad > 일본정보올림피아드 예선 > JOI 2006 모의고사 2 4번

  • 잘못된 조건을 찾은 사람: august14
  • 문제를 번역한 사람: baekjoon
  • 데이터를 추가한 사람: doju