### 2009 Mock Dwite by A.J.: Problem 1

## Super Special Awesome Numbers =D

A 'super' number is a number whose digital sum (*i.e.*, the sum of its digits) is even!

A 'special' number is a number with strictly increasing digits!

An 'awesome' number is a number that is not divisible by any perfect square other than 1!

Given a range, determine how many Super Special Awesome numbers lie within it.

### Input

The input will contain five lines. Each line will contain two integers*L*and

*U*(1 ≤

*L*≤

*U*≤ 1 000 000).

### Output

For each line given in input, in the order given, output one line containing a single integer: the number of Super Special Awesome numbers between*L*and

*U*(inclusive).

### Sample Input

2 10 30 300 6666 66666 12345 67890 100000 1000000

### Sample Output

2 23 51 50 32

All Submissions

Best Solutions

**Point Value:** 10 (partial)

**Time Limit:** 60.00s

**Memory Limit:** 256M

**Added:** Sep 26, 2009

**Author:** amleshjk

**Languages Allowed:**

C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

## Comments (Search)

Froston Mar 25, 2016 - 4:10:48 pm UTC Grader giving odd resultsI'm getting an output as high as 137998 on the grader, but my program works for the test cases given. Even when I set L to 1 and U to 1000 000, I only got an output of 171. Can someone help?

spencereiron Mar 26, 2016 - 3:59:13 pm UTC Re: Grader giving odd resultsjargonon Mar 27, 2016 - 12:57:54 am UTC Re: Grader giving odd resultsFroston Apr 03, 2016 - 1:40:47 am UTC Re: Grader giving odd resultsjargonon Apr 04, 2016 - 3:27:11 pm UTC Re: Grader giving odd resultsspencereiron Apr 04, 2016 - 4:37:37 pm UTC Re: Grader giving odd resultsshreerockz15on Jan 28, 2016 - 8:16:25 pm UTC My outputs are differing by 5 to 6.I am having trouble debugging it. Help would be appreciated.

wgma00on Jan 29, 2016 - 3:24:47 am UTC Re: My outputs are differing by 5 to 6.shreerockz15on Jan 29, 2016 - 10:08:33 am UTC Re: My outputs are differing by 5 to 6.