SQUA_REV - Revenge of the squares
Given a number calculate the product N of their digits bigger than zero. The output is the number R of different (!) presentations of N in the form A*A+B*B with A and B being positive integers including zero.
Input
Twenty tests with one positive integer < 10^20.
Output
Print the illustrated above number R for each test.
Example
Input: 5
7
78185824586267361855 Output: 1
0
3
hide comments
HWK:
2011-03-02 16:13:14
This should be a shortening problem.
|
Added by: | HWK |
Date: | 2011-02-25 |
Time limit: | 1.096s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |