TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P2466
  • Problem
  • P2466异或和
    Limits : Time Limit : 1000 MS   Memory Limit : 131072 KB
    Description

    求1 xor 2 xor 3 xor......xor N 的值。
    A xor B 即A,B 按位异或。

    Input Format

    1 个整数N。

    Output Format

    1 个整数,表示所求的值。

    Sample Input

    3

    Sample Output

    0

    Hint

    对于40% 的数据,1<=N<=10^6;
    对于100% 的数据,1<=N<=10^18。