A Xor Problem

Revision en2, by virus_1010, 2016-12-26 10:50:50

Given T(1 <= T <= 1e5) the no. of test cases.
Each testcase contains an integer N(1 <= N <= 1e18).
We define F(x) as the xor of all the digits in x.
Find (summation of F(x) where x goes from 1 to N) for each testcase.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English virus_1010 2016-12-26 11:12:26 36 Tiny change: 'se.<br> \n' -> 'se.<br> \nCan anyone help me with this? <br>\n'
en2 English virus_1010 2016-12-26 10:50:50 0 (published)
en1 English virus_1010 2016-12-26 10:49:07 276 Initial revision (saved to drafts)