백준 18005번 Even or Odd?
문제 링크입니다: www.acmicpc.net/problem/18005 18005번: Even or Odd? Output 2 if the sum of any n consecutive integers in the range from 1 to 1018 must be even, 1 if the sum must be odd, or 0 if the sum could be either even or odd. www.acmicpc.net N이 홀수일 경우 합 -> 홀수/짝수 모두 가능 i) 홀수가 홀수개인 경우 -> 홀수 ii) 홀수가 짝수개인 경우 -> 짝수 N이 짝수일 경우 합 (가우스의 덧셈 법칙 이용) ex) N=6, [1, 2, 3, 4, 5, 6] ex) N=4, [1, 2, 3, 4] i) N/2이 홀수..