21 lines
364 B
Plaintext
21 lines
364 B
Plaintext
void local fn DoIt
|
|
for long N = 3 to 9
|
|
print N;@" digits:";
|
|
for long curr = 10^(N-1) to 10^N-1
|
|
long sum = 0
|
|
long temp = curr
|
|
do
|
|
long dig = temp % 10
|
|
temp = temp / 10
|
|
sum += dig ^ N
|
|
until temp == 0
|
|
if ( sum == curr ) then printf @"%12ld\b",curr
|
|
next
|
|
print
|
|
next
|
|
end fn
|
|
|
|
fn DoIt
|
|
|
|
HandleEvents
|