[BOJ 12833] XORXORXOR

View as PDF

Submit solution

Points: 1
Time limit: 0.2s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

세 수 A, B, C를 입력 받은 다음, ( ( ( ( A XOR B ) XOR B ) XOR B ) … ) XOR B 형태로 연산을 C회 했을 때의 결과값을 출력하는 프로그램을 작성하시오.

입력 형식

첫째 줄에 A, B, C가 주어진다. (0 < A, B, C ≤ 109)

출력 형식

첫째 줄에 계산된 결과를 출력한다.

예제 입력

13 3 1

예제 출력

14

Comments

There are no comments at the moment.