This commit is contained in:
2025-12-15 13:31:12 +01:00
commit 26e0102f58
10165 changed files with 233472 additions and 0 deletions

17
2/queen1/test Normal file
View File

@@ -0,0 +1,17 @@
solve with HSgpt:
TL;DR
The program is a tiny “Collatzstep” challenge.
main creates two random numbers:
N=1000000+random() a large (≈1million) starting value.
k=abs( (random() & 0xFF) ) a small nonnegative integer (0255).
func0 prints “Challenge: N k\n>>> ”, reads an integer answer from stdin, calls func1(N,k), and checks whether the returned value equals answer. If it does, it prints “Correct.” and returns0; otherwise it prints “Wrong.” and returns1.
func1 implements k iterations of the Collatz (3n+1) map on the value n that is passed in w0.
Challenge: 524465851 157
The result after performing 157 Collatzsteps on the starting value 524465851 is: 526
Challenge: 1871541254 68
Result after 68 Collatz steps:30046216