TouchStone
  Please Login
Login Sign Up
距离明年CSP第一轮: ??天 距离CSP第二轮: ??天 距离NOIP还有: ??天
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P4363
  • Problem
  • P4363【杜教筛】Sum
    Limits : Time Limit : 10000 MS   Memory Limit : - KB
    Judgment Tips : Time Limit: 1 Sec Memory Limit: 128 MB
    Description

    Input Format

    一共T+1行

    第1行为数据组数T(T<=10)

    第2~T+1行每行一个非负整数N,代表一组询问

    Output Format

    一共T行,每行两个用空格分隔的数ans1,ans2

    Sample Input 1

    6
    1
    2
    8
    13
    30
    2333

    Sample Output 1

    1 1
    2 0
    22 -2
    58 -3
    278 -3
    1655470 2

    Sample Input 2

    10
    326554008
    13834965
    6350400
    570847421
    1277924160
    67509313
    658838056
    8887425
    472492441
    35798377

    Sample Output 2

    32413919304568396 -55
    58180527582330 63
    12258114926902 332
    99051623222656722 3619
    496399883802047902 6027
    1385316146914154 -699
    131940724307607802 -3671
    24008965138308 -446
    67859591449867750 -3685
    389536539338864 1838


    Source  bzoj 3944