Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
22
Task/Prime-decomposition/11l/prime-decomposition.11l
Normal file
22
Task/Prime-decomposition/11l/prime-decomposition.11l
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
F decompose(BigInt number)
|
||||
[BigInt] result
|
||||
V n = number
|
||||
BigInt i = 2
|
||||
L n % i == 0
|
||||
result.append(i)
|
||||
n I/= i
|
||||
i = 3
|
||||
L n >= i * i
|
||||
L n % i == 0
|
||||
result.append(i)
|
||||
n I/= i
|
||||
i += 2
|
||||
I n != 1
|
||||
result.append(n)
|
||||
R result
|
||||
|
||||
L(i) 2..9
|
||||
print(decompose(i))
|
||||
print(decompose(1023 * 1024))
|
||||
print(decompose(2 * 3 * 5 * 7 * 11 * 11 * 13 * 17))
|
||||
print(decompose(BigInt(16860167264933) * 179951))
|
||||
Loading…
Add table
Add a link
Reference in a new issue