• [B] Easy Problem

  • 时间限制: 2000 ms 内存限制: 65535 K
  • 问题描述
  • To everyone enjoy the contest, Sweetzero give us a very simple problem !
    See description below:

    for(int i = 1; i <= n; i ++)

    for(int j = i + 1; j <= n; j ++)

    for(int k = j + 1; k <= n; k ++)

    if((i ^ j ^ k) == 0) sum = (sum + i + j + k)%(1000000007);
    Now give you the n, you should tell Sweetzero the sum.
  • 输入
  • There are several test cases, please process till EOF.
    A single integer N(1 <= N <= 10^9) per line.
  • 输出
  • For each N , you should output the sum%1000000007 in one line.
  • 样例输入
  • 6
    9
    133652858
  • 样例输出
  • 42
    102
    116227218
  • 提示
  • 来源
  • Sweetzero@SYSU&&SCAU
  • 操作

显示春菜