- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
#include <stdio.h>
int getLen(long long num)
{
int count=0;
while (num > 0)
{
count++;
num/=10;
}
return count;
}
int main(void)
{
int count = 0;
for (long long i=1; i<=9; i++)
{
long long num = 1;
int modify=0;
for (int j=1; j<30; j++)
{
if (i==7 && j == 5)
{
int a= 1;
a++;
}
num *= i;
if (getLen(num) == j-modify)
{
printf("%d^%d=%lld OK %d\n", i, j, num, count+1);
count++;
}
if (num > 10000000)
{
num/=10;
modify++;
}
}
}
printf("%d\n", count);
return 0;
}
lohpider 30.05.2012 15:24 # −12
exile 30.05.2012 15:34 # −8
absolut 30.05.2012 16:09 # +3
bormand 30.05.2012 16:11 # +6
TarasB 30.05.2012 16:30 # +7
bormand 30.05.2012 16:36 # −1
Evaluate the following form. Hint: the answer is not "unbound variable YOU" or "undefined function SPAMMER-P". Work with me here.
(null (spammer-p you))
roman-kashitsyn 30.05.2012 16:38 # +2
bormand 30.05.2012 16:41 # 0
govnomonad 30.05.2012 16:39 # +2
bormand 30.05.2012 16:42 # +2
wvxvw 30.05.2012 18:17 # 0