Desik And Sum
All submissions for this problem are available.
Desik writes down all numbers from L to R. He wants to find the sum of even numbers whose sum of digits is divisible by 3. As the range can be very large please help him with the problem.
First line contains T denoting the number of test cases.
T lines follow containing two space separated integers L and R.
Print the answer to problem for the given test cases in newline.
- 1 ≤ T ≤ 10000
- 1 ≤ L ≤ R ≤ 10 ^ 9
Input: 1 1 20 Output: 36
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions