Skip to content

Commit e605957

Browse files
make cool changes
1 parent 751a2c7 commit e605957

File tree

8 files changed

+185
-1
lines changed

8 files changed

+185
-1
lines changed

Math/catalan number/catalan_number_dynamic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include <iostream>
1+
#include <iostream>
22
#include<bits/stdc++.h>
33
using namespace std;
44

Python/.idea/Python.iml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/.idea/inspectionProfiles/profiles_settings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/.idea/misc.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/.idea/workspace.xml

+105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/EulerTotientFunction.py

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
def prime_factors(n):
2+
i = 2
3+
factors = [1]
4+
while i * i <= n:
5+
if n % i:
6+
i += 1
7+
else:
8+
n //= i
9+
factors.append(i)
10+
if n > 1:
11+
factors.append(n)
12+
return factors
13+
14+
15+
def is_prime(list):
16+
if len(list) == 2:
17+
return True
18+
else:
19+
return False
20+
21+
22+
def prime_powers():
23+
list = [1, 2, 2, 3, 3]
24+
output_list = []
25+
for i in range(1, len(list) - 1):
26+
if list[i] == list[i + 1]:
27+
output_list.append(list[i] * list[i + 1])
28+
print(output_list)
29+
30+
def
31+
n = int(input("Input Number?"))
32+
factors_n = prime_factors(n)
33+
print(factors_n)
34+
35+
if is_prime(factors_n):
36+
phi_n = n-1
37+
38+
39+
print(phi_n)
40+
41+
#made some cool changes

0 commit comments

Comments
 (0)