Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
prompt N
|
||||
N→M: 0→X: 1→L
|
||||
While L=1
|
||||
X+1→X
|
||||
Disp M
|
||||
If M=1
|
||||
Then: 0→L
|
||||
Else
|
||||
If remainder(M,2)=1
|
||||
Then: 3*M+1→M
|
||||
Else: M/2→M
|
||||
End
|
||||
End
|
||||
End
|
||||
{N,X}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
prompt N
|
||||
0→A:0→B
|
||||
for(I,1,N)
|
||||
I→M: 0→X: 1→L
|
||||
While L=1
|
||||
X+1→X
|
||||
If M=1
|
||||
Then: 0→L
|
||||
Else
|
||||
If remainder(M,2)=1
|
||||
Then: 3*M+1→M
|
||||
Else: M/2→M
|
||||
End
|
||||
End
|
||||
End
|
||||
If X>B: Then
|
||||
I→A:X→B
|
||||
End
|
||||
Disp {I,X}
|
||||
End
|
||||
{A,B}
|
||||
Loading…
Add table
Add a link
Reference in a new issue