Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
4
Task/Square-but-not-cube/F-Sharp/square-but-not-cube.fs
Normal file
4
Task/Square-but-not-cube/F-Sharp/square-but-not-cube.fs
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
let rec fN n g φ=if φ<31 then match compare(n*n)(g*g*g) with | -1->printfn "%d"(n*n);fN(n+1) g (φ+1)
|
||||
| 0->printfn "%d cube and square"(n*n);fN(n+1)(g+1)φ
|
||||
| 1->fN n (g+1) φ
|
||||
fN 1 1 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue