Calculate!
Time limit1sMemory limit256 MB
Given A, B and a huge count C, find the value of A after XORing B into it C times.
- Level
Easy3 of 10
- Topics
- Bit manipulation, Math, Implementation
- Solved
- No attempts yet
Problem
Ingyu is famous for solving logical operations very quickly and accurately. To check whether the rumor is true, Gyojeong asked Ingyu a few questions.
- Gyojeong: "Ingyu, what is
3 & 5?" - Ingyu: "The answer is 1."
- Gyojeong: "Can I ask something a bit harder this time?"
- Ingyu: "Of course."
- Gyojeong: "Then what is
12345678 | 44555?" - Ingyu: "The answer is 12382031."
Ingyu answered every question correctly, one after another, so Gyojeong thought of something to test.
- Gyojeong: "Ingyu, then can you also compute the number you get by XORing B into a number A, C times?"
- Ingyu: "One second is enough for that."
Gyojeong wants to check whether the answer Ingyu gave in one second is correct. On Gyojeong's behalf, write a program that prints the number obtained by XORing into , times.
Input
The first line contains , , and , separated by spaces. (, )
Output
Print the result of XORing into , times. This is the value of after the operation is repeated times.