bookmark_borderCount Leading Zeros in 25!^25!

(25!) = 15511210043330985984000000 => (6 zeros)

Detecting Pattern:
(25!) ^ 1 => (15511210…85984000000) => 6 zeros
(25!) ^ 2 => (24059763…48256000000000000) => 12 zeros
(25!) ^ 3 => (37319604…43904000000000000000000) => 18 zeros
(25!) ^ 4 => (57887222…41536000000000000000000000000) => 24 zeros
(25!) ^ 5 => (89790087…31424000000000000000000000000000000) => 30 zeros
and so on..

thus:
Leading Zeros in [ (25!) ^ (25!) ] = [Number of leading zeros in (25!)] * (25!)

[Number of leading zeros in (25!)] = 6 zeros
value of (25!) = 15511210043330985984000000

leading zeros in (25!)^(25!) = 6 * 15511210043330985984000000
= 93067260259985915904000000 zeros

bookmark_borderIBM October 2020 – Challenge (control-flow graph)

https://www.research.ibm.com/haifa/ponderthis/challenges/October2020.html

This month’s challenge is dedicated to the memory of Frances Allen, who passed away in August. Among her many accomplishments is the invention of the control-flow graph, in her 1970 paper “Control flow analysis

My solution

with step number:

10 A = a
20 B = b
30 JMP_ZERO B 90
40 AA = A
50 BB = B
60 A = B
70 B = AA % BB
80 JMP 30
90 RETURN A


-----

without step number:

A = a
B = b
JMP_ZERO B 90
AA = A
BB = B
A = B
B = AA % BB
JMP 30
RETURN A

IBM Gadi submission result:

Thanks! This indeed computes the GCD, but the requirement on the number of paths is not fulfilled.