From 0d3e1484c6f2cce220e744b58da7218e2ffbe7aa Mon Sep 17 00:00:00 2001 From: Chandana-23 Date: Fri, 1 Oct 2021 16:07:13 +0530 Subject: [PATCH 01/38] Intro Page is added --- HTML CSS/intro_chandana-23.html | 100 ++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 HTML CSS/intro_chandana-23.html diff --git a/HTML CSS/intro_chandana-23.html b/HTML CSS/intro_chandana-23.html new file mode 100644 index 000000000..74e1de231 --- /dev/null +++ b/HTML CSS/intro_chandana-23.html @@ -0,0 +1,100 @@ + + + + + + + Twowaits + + + +
+ +
+
+

TATHASTU

+

To all your dreams for your career.

+

Pick a course relevant to your skillset and ambition.

+
CP, DSA, Python all courses you will ever need.
+
+
Those too at ridiculously low prices!
+
+
+ twowaits logo +
+
+
+
    +
  • 500+
    Students Empowered
  • +
  • 15+
    Unique Courses
  • +
  • 50+
    Colleges Impacted
  • +
+
+
+ + \ No newline at end of file From 190e8ba458740d56286405c058133aa21044bcec Mon Sep 17 00:00:00 2001 From: CHANDANA SAMINENI Date: Sat, 2 Oct 2021 10:07:04 +0530 Subject: [PATCH 02/38] 1stOct_Chandana-23 --- Python/1stOct_Chandana-23.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Python/1stOct_Chandana-23.py diff --git a/Python/1stOct_Chandana-23.py b/Python/1stOct_Chandana-23.py new file mode 100644 index 000000000..46ce89c04 --- /dev/null +++ b/Python/1stOct_Chandana-23.py @@ -0,0 +1,27 @@ +#Print the Fibonacci Series upto n while replacing prime numbers, all multiples of 5 by 0 + +def isPrime(x): + if x == 1: + return False + for i in range(2,x): + if x%i == 0: + return False + return True +def fibonacci(n): + f1 = 1 + f2 = 1 + print(f1,f2,end=" ") + for i in range(3,n+1): + f3 = f1 + f2 + if f3%5 == 0 or isPrime(f3): + print(0,end=" ") + else: + print(f3,end=" ") + f1 = f2 + f2 = f3 + +n = int(input("Enter n value: ")) +if n<0: + print("Please enter positive n value") +else: + fibonacci(n) From eb415400177894d99840aab134ceb01d8435bbce Mon Sep 17 00:00:00 2001 From: CHANDANA SAMINENI Date: Sat, 9 Oct 2021 12:17:02 +0530 Subject: [PATCH 03/38] Python file --- Python/2021/9thOct_Chandana-23.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Python/2021/9thOct_Chandana-23.py diff --git a/Python/2021/9thOct_Chandana-23.py b/Python/2021/9thOct_Chandana-23.py new file mode 100644 index 000000000..581ff2d6c --- /dev/null +++ b/Python/2021/9thOct_Chandana-23.py @@ -0,0 +1,17 @@ +import math + +a,b = map(int,input().split()) + +def factorial(n): + if n<=1: + return 1 + return n*factorial(n-1) + + +a1 = factorial(a) +b1 = factorial(b) + +print(math.gcd(a1,b1)) + + + From ca34432dbc48df5e1245480b0324db40c44b8d83 Mon Sep 17 00:00:00 2001 From: Chetan Shahra <62139933+chetanshahra@users.noreply.github.com> Date: Sat, 9 Oct 2021 12:34:12 +0530 Subject: [PATCH 04/38] Create 9thOct_chetanshahra.py --- Python/2021/9thOct_chetanshahra.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Python/2021/9thOct_chetanshahra.py diff --git a/Python/2021/9thOct_chetanshahra.py b/Python/2021/9thOct_chetanshahra.py new file mode 100644 index 000000000..b530a3cee --- /dev/null +++ b/Python/2021/9thOct_chetanshahra.py @@ -0,0 +1,5 @@ +import math + +a = 5 +b = 120 +print(math.factorial(min(a, b))) From 756b13a622f54c977eea56a0aebe4bc9ffd1954f Mon Sep 17 00:00:00 2001 From: Suraj-Wakka <58338343+surajwakka@users.noreply.github.com> Date: Sat, 9 Oct 2021 12:39:54 +0530 Subject: [PATCH 05/38] Create 9oct_surajwakka.py --- Python/2021/9oct_surajwakka.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Python/2021/9oct_surajwakka.py diff --git a/Python/2021/9oct_surajwakka.py b/Python/2021/9oct_surajwakka.py new file mode 100644 index 000000000..412e0ae30 --- /dev/null +++ b/Python/2021/9oct_surajwakka.py @@ -0,0 +1,11 @@ +import math + +def gcdOfFactorial(m, n) : + + return math.factorial(min(m, n))# Driver code + +m = 5 + +n = 9 + +print(gcdOfFactorial(m, n)) From bb6647f1357f4d90f238da48d1b303495cbbc616 Mon Sep 17 00:00:00 2001 From: NIKHILz <57571412+NIKHILBz@users.noreply.github.com> Date: Sat, 9 Oct 2021 12:41:22 +0530 Subject: [PATCH 06/38] Create 9thOct_nikhilbz.cpp --- C++/2021/9thOct_nikhilbz.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 C++/2021/9thOct_nikhilbz.cpp diff --git a/C++/2021/9thOct_nikhilbz.cpp b/C++/2021/9thOct_nikhilbz.cpp new file mode 100644 index 000000000..b7aa4be25 --- /dev/null +++ b/C++/2021/9thOct_nikhilbz.cpp @@ -0,0 +1,24 @@ +// You are given two number a and b, you have to print the GCD of the factorials of these two numbers. + +#include +using namespace std; +int gcd(int a, int b) +{ + if (a == 0) + return b; + if (b == 0) + return a; + + if (a == b) + return a; + + if (a > b) + return gcd(a-b, b); + return gcd(a, b-a); +} +int main() +{ + int a = 98, b = 56; + cout<<"GCD of "< Date: Sat, 9 Oct 2021 12:43:52 +0530 Subject: [PATCH 07/38] C++ file --- C++/2021/9thOct_Chandana-23.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C++/2021/9thOct_Chandana-23.cpp diff --git a/C++/2021/9thOct_Chandana-23.cpp b/C++/2021/9thOct_Chandana-23.cpp new file mode 100644 index 000000000..77bae07ff --- /dev/null +++ b/C++/2021/9thOct_Chandana-23.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; + + +int factorial(int x) +{ + if (x<=1) + { + return 1; + } + return x*factorial(x-1); + +} +int main() +{ + int a,b; + cin>>a>>b; + a = factorial(a); + b = factorial(b); + int result = a>b?a:b; + cout< Date: Sat, 9 Oct 2021 12:54:53 +0530 Subject: [PATCH 08/38] added code for Gcd of two numbers --- C++/2021/9thSep_Pooja-Das.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 C++/2021/9thSep_Pooja-Das.cpp diff --git a/C++/2021/9thSep_Pooja-Das.cpp b/C++/2021/9thSep_Pooja-Das.cpp new file mode 100644 index 000000000..0aa3c7e7d --- /dev/null +++ b/C++/2021/9thSep_Pooja-Das.cpp @@ -0,0 +1,31 @@ +// Euclidean algo to find GCD of two numbers +#include +using namespace std; +// Recursive function to return gcd of a and b +int gcd(int a, int b) +{ + // Everything divides 0 + //Base case + if (a == 0) + return b; + if (b == 0) + return a; + + // base case + if (a == b) + return a; + + // a is greater + if (a > b) + return gcd(a-b, b); + return gcd(a, b-a); +} + +// Driver program to test above function +int main() +{ + int a,b; + cin>>a>>b; + cout<<"GCD of "< Date: Sat, 9 Oct 2021 12:55:36 +0530 Subject: [PATCH 09/38] Create 9thOct_zeel88.cpp I had completed the task successfully. Kindly merge it. --- C++/2021/9thOct_zeel88.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 C++/2021/9thOct_zeel88.cpp diff --git a/C++/2021/9thOct_zeel88.cpp b/C++/2021/9thOct_zeel88.cpp new file mode 100644 index 000000000..f9c646678 --- /dev/null +++ b/C++/2021/9thOct_zeel88.cpp @@ -0,0 +1,25 @@ +#include +using namespace std; + +int find_factorial(int x) +{ + if (x <= 1) + return 1; + int res = 2; + for (int i = 3; i <= x; i++) + res = res * i; + return res; +} + +int gcd_Of_factorial(int m, int n) +{ + return find_factorial(min(m, n)); +} + +int main() +{ + int i,j; + cin>>i>>j; + cout << gcd_Of_factorial(i, j); + return 0; +} From b9565d379a525d11a99e8537648af4cfd77548fb Mon Sep 17 00:00:00 2001 From: AnupamTekale <65555514+AnupamTekale@users.noreply.github.com> Date: Sat, 9 Oct 2021 12:56:52 +0530 Subject: [PATCH 10/38] GCD of the factorials of two numbers. --- JAVA/9thOct_Anupamtekale.java | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 JAVA/9thOct_Anupamtekale.java diff --git a/JAVA/9thOct_Anupamtekale.java b/JAVA/9thOct_Anupamtekale.java new file mode 100644 index 000000000..fd55211e7 --- /dev/null +++ b/JAVA/9thOct_Anupamtekale.java @@ -0,0 +1,35 @@ +import java.util.*; + +class GCD +{ + public static int gcd(int x,int y) + { + if(y==0) + return x; + else + return gcd(y,x%y); + } + public static int factorial(int n) + { + if(n==1) + return 1; + else + return n*factorial(n-1); + } + + public static void main(String args[]) + { + Scanner in = new Scanner(System.in); + int arr[] = new int[2]; + for(int i=0;i Date: Sat, 9 Oct 2021 13:04:24 +0530 Subject: [PATCH 11/38] Create 9thOct_zeel88.py --- Python/2021/9thOct_zeel88.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/2021/9thOct_zeel88.py diff --git a/Python/2021/9thOct_zeel88.py b/Python/2021/9thOct_zeel88.py new file mode 100644 index 000000000..ab2ed7cfb --- /dev/null +++ b/Python/2021/9thOct_zeel88.py @@ -0,0 +1,9 @@ +import math + +def gcdOfFactorial(m, n) : + return math.factorial(min(m, n)) + +# Driver code +m = 5 +n = 9 +print(gcdOfFactorial(m, n)) From 4c0fd46f3c195a08039b192a5380d1d25857e45a Mon Sep 17 00:00:00 2001 From: Pooja-Das <81691805+Pooja-Das@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:06:39 +0530 Subject: [PATCH 12/38] added GCD of two numbers in python --- Python/2021/9thSep_Pooja-Das.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/2021/9thSep_Pooja-Das.py diff --git a/Python/2021/9thSep_Pooja-Das.py b/Python/2021/9thSep_Pooja-Das.py new file mode 100644 index 000000000..589c2d046 --- /dev/null +++ b/Python/2021/9thSep_Pooja-Das.py @@ -0,0 +1,9 @@ +def gcd(a,b): + if(b==0): + return a + else: + return gcd(b,a%b) +a=int(input("Enter first number:")) +b=int(input("Enter second number:")) +GCD=gcd(a,b) +print(GCD) From 6d16cd4b65c1dd108799188ae78f2fd94a919da9 Mon Sep 17 00:00:00 2001 From: Pooja-Das <81691805+Pooja-Das@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:12:08 +0530 Subject: [PATCH 13/38] Added Gcd of two numbers --- JAVA/2021/9thSep_Pooja-Das.java | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 JAVA/2021/9thSep_Pooja-Das.java diff --git a/JAVA/2021/9thSep_Pooja-Das.java b/JAVA/2021/9thSep_Pooja-Das.java new file mode 100644 index 000000000..20fe57bc8 --- /dev/null +++ b/JAVA/2021/9thSep_Pooja-Das.java @@ -0,0 +1,29 @@ +import java.util.Scanner; +public class GCDExample3 { + + public static void main(String[] args) { + + int num1, num2; + + //Reading the input numbers + Scanner scanner = new Scanner(System.in); + System.out.print("Enter first number:"); + num1 = (int)scanner.nextInt(); + + System.out.print("Enter second number:"); + num2 = (int)scanner.nextInt(); + + //closing the scanner to avoid memory leaks + scanner.close(); + while (num1 != num2) { + if(num1 > num2) + num1 = num1 - num2; + else + num2 = num2 - num1; + } + + //displaying the result + System.out.printf("GCD of given numbers is: %d", num2); + } + +} From f551ae0a7bc2b6b8c5021184afbf51293c4f8ee7 Mon Sep 17 00:00:00 2001 From: FARHEEN <73988805+Farheen15320@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:20:42 +0530 Subject: [PATCH 14/38] Create 9thOct_Farheen15320_.java --- JAVA/2021/9thOct_Farheen15320_.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 JAVA/2021/9thOct_Farheen15320_.java diff --git a/JAVA/2021/9thOct_Farheen15320_.java b/JAVA/2021/9thOct_Farheen15320_.java new file mode 100644 index 000000000..74161b0be --- /dev/null +++ b/JAVA/2021/9thOct_Farheen15320_.java @@ -0,0 +1,26 @@ +import java.util.*; + + public class Main { + + public static void main(String[] args) { + Scanner scn = new Scanner(System.in); + int num1 = scn.nextInt(); + int num2 = scn.nextInt(); + + //storing original num + int tnum1 = num1; + int tnum2 = num2; + + while(tnum1 % tnum2 != 0){ + int rem = tnum1 % tnum2; + //changing divison & dividend + tnum1 = tnum2; + tnum2 = rem; + } + + int gcd = tnum2; + + System.out.println(gcd); + + } + } From 7528e2dd586920799d75fcd807e0b94a704738b8 Mon Sep 17 00:00:00 2001 From: Madan <58905767+Madanaa@users.noreply.github.com> Date: Sat, 9 Oct 2021 00:54:47 -0700 Subject: [PATCH 15/38] Create 9thOct_Madanaa.java --- JAVA/2021/9thOct_Madanaa.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 JAVA/2021/9thOct_Madanaa.java diff --git a/JAVA/2021/9thOct_Madanaa.java b/JAVA/2021/9thOct_Madanaa.java new file mode 100644 index 000000000..8e8872579 --- /dev/null +++ b/JAVA/2021/9thOct_Madanaa.java @@ -0,0 +1,28 @@ +import java.util.Scanner; +public class Main { + static int factorial(int x) +{ + if (x <= 1) + return 1; + int res = 2; + for (int i = 3; i <= x; i++) + res = res * i; + return res; +} + +static int gcdFactorial(int m, int n) +{ + int min = m < n ? m : n; + return factorial(min); +} + + + public static void main (String[] args) + { + + Scanner sc = new Scanner (System.in); + int m = sc.nextInt(); + int n = sc.nextInt(); + System.out.println(gcdFactorial(m, n)); + } +} From 382b3b6ba177c3ec2e5fc853fa9c30838cb7d86c Mon Sep 17 00:00:00 2001 From: ssachis <89895559+ssachis@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:26:38 +0530 Subject: [PATCH 16/38] 9thOct_ssachis.cpp --- C++/2021/9thOct_ssachis.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 C++/2021/9thOct_ssachis.cpp diff --git a/C++/2021/9thOct_ssachis.cpp b/C++/2021/9thOct_ssachis.cpp new file mode 100644 index 000000000..d18dff8f7 --- /dev/null +++ b/C++/2021/9thOct_ssachis.cpp @@ -0,0 +1,21 @@ +#include +#include +using namespace std; +int factorial(int x){ + + int fact=1; +for(int i=1;i<=x;i++){ + fact=fact*i; + +} +return fact; + +} +int gcdoffact(int m,int n){ + return (min(m,n)); + +} +int main(){ + +cout< Date: Sat, 9 Oct 2021 13:36:50 +0530 Subject: [PATCH 17/38] Update 9thOct_ssachis.cpp --- C++/2021/9thOct_ssachis.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/C++/2021/9thOct_ssachis.cpp b/C++/2021/9thOct_ssachis.cpp index d18dff8f7..28d210226 100644 --- a/C++/2021/9thOct_ssachis.cpp +++ b/C++/2021/9thOct_ssachis.cpp @@ -2,7 +2,13 @@ #include using namespace std; int factorial(int x){ - + if(x<0){ + return 0; + } + if(x==0){ + return 1; + } + int fact=1; for(int i=1;i<=x;i++){ fact=fact*i; From b6f1c95a423842532579662d57cbfdff7bde546e Mon Sep 17 00:00:00 2001 From: ssachis <89895559+ssachis@users.noreply.github.com> Date: Sat, 9 Oct 2021 13:41:52 +0530 Subject: [PATCH 18/38] 9thoct_ssachis.py --- Python/2021/9thoct_ssachis.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/2021/9thoct_ssachis.py diff --git a/Python/2021/9thoct_ssachis.py b/Python/2021/9thoct_ssachis.py new file mode 100644 index 000000000..ab2ed7cfb --- /dev/null +++ b/Python/2021/9thoct_ssachis.py @@ -0,0 +1,9 @@ +import math + +def gcdOfFactorial(m, n) : + return math.factorial(min(m, n)) + +# Driver code +m = 5 +n = 9 +print(gcdOfFactorial(m, n)) From c136018bf7be0d51692effcc150c12b5966ed6e2 Mon Sep 17 00:00:00 2001 From: Anshu kumar pathak Date: Sat, 9 Oct 2021 13:45:09 +0530 Subject: [PATCH 19/38] solved issue --- C++/2021/9thOct_AnshuPathak-88825.cpp | 45 +++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 C++/2021/9thOct_AnshuPathak-88825.cpp diff --git a/C++/2021/9thOct_AnshuPathak-88825.cpp b/C++/2021/9thOct_AnshuPathak-88825.cpp new file mode 100644 index 000000000..955cd1ac4 --- /dev/null +++ b/C++/2021/9thOct_AnshuPathak-88825.cpp @@ -0,0 +1,45 @@ +#include +using namespace std; +int GCD(int num1, int num2) +{ + if (num1 == 0) + { + return num2; + } + + if (num2 == 0) + { + return num1; + } + + if (num1 == num2) + { + return num1; + } + + if (num1 > num2) + { + return GCD(num1 - num2, num2); + } + + return GCD(num1, num2 - num1); +} +int fact(int n) +{ + if (n == 0) + { + return 1; + } + return n * fact(n - 1); +} +int main() +{ + int a, b; + cin >> a >> b; + int numfact1 = fact(a); + int numfact2 = fact(b); + int GCDnum = GCD(numfact1, numfact2); + cout << GCDnum; + + return 0; +} \ No newline at end of file From aa6655222f7181d34ba2020830db54552c4dc01a Mon Sep 17 00:00:00 2001 From: Ashutosh Mittal Date: Sat, 9 Oct 2021 13:46:41 +0530 Subject: [PATCH 20/38] GCD OF TWO NUMBERS --- C++/2021/9oct_ashutoshmittal26.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 C++/2021/9oct_ashutoshmittal26.cpp diff --git a/C++/2021/9oct_ashutoshmittal26.cpp b/C++/2021/9oct_ashutoshmittal26.cpp new file mode 100644 index 000000000..d4c477fc7 --- /dev/null +++ b/C++/2021/9oct_ashutoshmittal26.cpp @@ -0,0 +1,24 @@ +#include +using namespace std; + +int fact(int x) { + if (x < 2) + return 1; + int ans = 2; + for (int i = 3; i <= x; i++) + ans *= i; + return ans; +} + +int gcdOfFact(int a, int b) { + if(a Date: Sat, 9 Oct 2021 13:50:11 +0530 Subject: [PATCH 21/38] GCD OF TWO NUMBERS IN PYTHON --- C++/2021/9oct_ashutoshmittal26.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 C++/2021/9oct_ashutoshmittal26.py diff --git a/C++/2021/9oct_ashutoshmittal26.py b/C++/2021/9oct_ashutoshmittal26.py new file mode 100644 index 000000000..31c22dcab --- /dev/null +++ b/C++/2021/9oct_ashutoshmittal26.py @@ -0,0 +1,10 @@ +import math + +def gcdOfFactorial(m, n) : + + return math.factorial(min(m, n)) + + +m = int(input("Enter first no. :")) +n = int(input("Enter secound no. :")) +print(gcdOfFactorial(m, n)) \ No newline at end of file From 24dbdd8a3113c70d44e52b9198af2e84582f7862 Mon Sep 17 00:00:00 2001 From: Paridhi Jain <83594113+Paridhicodes@users.noreply.github.com> Date: Sat, 9 Oct 2021 14:00:42 +0530 Subject: [PATCH 22/38] Created 9thOct_Paridhicodes.java --- JAVA/2021/9thOct_Paridhicodes.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 JAVA/2021/9thOct_Paridhicodes.java diff --git a/JAVA/2021/9thOct_Paridhicodes.java b/JAVA/2021/9thOct_Paridhicodes.java new file mode 100644 index 000000000..a66a2b008 --- /dev/null +++ b/JAVA/2021/9thOct_Paridhicodes.java @@ -0,0 +1,16 @@ +//Solution to issue #1875 +//GCD of two factorials +import java.util.Scanner; +public class Solution{ + public static void main(String []args){ + Scanner sc= new Scanner(System.in); + int num1=sc.nextInt(); + int num2=sc.nextInt(); + int res=Math.min(num1,num2); + int fact=1; + for(int i=1;i<=res;i++){ + fact=fact*i; + } + System.out.println(fact);//Result is the factorial of the smallest number + } +} From 8f5abbf213c6ae910f06263ac09660cc6aab4095 Mon Sep 17 00:00:00 2001 From: ssachis <89895559+ssachis@users.noreply.github.com> Date: Sat, 9 Oct 2021 14:02:15 +0530 Subject: [PATCH 23/38] Create 9thOct_ssachis.java --- JAVA/9thOct_ssachis.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 JAVA/9thOct_ssachis.java diff --git a/JAVA/9thOct_ssachis.java b/JAVA/9thOct_ssachis.java new file mode 100644 index 000000000..b60d44c89 --- /dev/null +++ b/JAVA/9thOct_ssachis.java @@ -0,0 +1,26 @@ +public class FactGCD{ + +static int factorial(int x) +{ + if (x <= 1) + return 1; + int res = 2; + for (int i = 3; i <= x; i++) + res = res * i; + return res; +} + +static int gcdOfFactorial(int m, int n) +{ + int min = m < n ? m : n; + return factorial(min); +} + + /* Driver program to test above functions */ + public static void main (String[] args) + { + int m = 5, n = 9; + + System.out.println(factorial(gcdOfFact(m, n))); + } +} From 3e90754f0acd258216be518559a3d760bc3e9230 Mon Sep 17 00:00:00 2001 From: san-ya <83218056+san-ya@users.noreply.github.com> Date: Sat, 9 Oct 2021 14:08:26 +0530 Subject: [PATCH 24/38] First commit --- Python/2021/9thOct_san-ya.py.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Python/2021/9thOct_san-ya.py.py diff --git a/Python/2021/9thOct_san-ya.py.py b/Python/2021/9thOct_san-ya.py.py new file mode 100644 index 000000000..988970160 --- /dev/null +++ b/Python/2021/9thOct_san-ya.py.py @@ -0,0 +1,23 @@ +def factorial(num: int) -> int: + if num == 1: + return num + return num * factorial(num - 1) + +def gcd(num1: int, num2: int) -> int: + if num1 == num2: + return num1 + if num1 < num2: + smaller = num1 + larger = num2 + elif num1 > num2: + smaller = num2 + larger = num1 + for divisor in range(smaller, 0, -1): + if larger % divisor == 0: + return divisor + +def gcdOfFactorial(a: int, b:int) -> int: + return gcd(factorial(a), factorial(b)) + +a, b = [int(num) for num in input().split()] +print(gcdOfFactorial(a, b)) \ No newline at end of file From b62dac36c68bcccdde081ea8c04abbdf499a20ba Mon Sep 17 00:00:00 2001 From: Meet-M-ShAh Date: Sat, 9 Oct 2021 14:14:39 +0530 Subject: [PATCH 25/38] Added GCD of Factorials of 2 numbers by Meet-M-ShAh --- Python/2021/9thOct_Meet-M-ShAh.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Python/2021/9thOct_Meet-M-ShAh.py diff --git a/Python/2021/9thOct_Meet-M-ShAh.py b/Python/2021/9thOct_Meet-M-ShAh.py new file mode 100644 index 000000000..8d73b2d34 --- /dev/null +++ b/Python/2021/9thOct_Meet-M-ShAh.py @@ -0,0 +1,9 @@ +import math +def gcdFact(a, b) : + return math.factorial(min(a, b)) + +a = int(input()) +b = int(input()) +print(gcdFact(a, b)) + +# Made by Meet-M-ShAh \ No newline at end of file From 8f44472e2ddff873f73e771e9bb1d6ab1d411f6b Mon Sep 17 00:00:00 2001 From: Srishti-1602 <88929699+Srishti-1602@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:21:58 +0530 Subject: [PATCH 26/38] Add files via upload --- Python/9thoct_Srishti-1602.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Python/9thoct_Srishti-1602.py diff --git a/Python/9thoct_Srishti-1602.py b/Python/9thoct_Srishti-1602.py new file mode 100644 index 000000000..fda494ae7 --- /dev/null +++ b/Python/9thoct_Srishti-1602.py @@ -0,0 +1,10 @@ +import math + +def gcd(a, b): + return math.factorial(min(a, b)) + + +a= int(input("Enter first number: ")) +b= int(input("Enter second number: ")) + +print(gcd(a,b)) \ No newline at end of file From 70a0fcb78e66b94bf73a5750919a7c188d282d33 Mon Sep 17 00:00:00 2001 From: ujjwalhans <56391241+ujjwalhans@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:29:33 +0530 Subject: [PATCH 27/38] Create 9thOct_ujjwalhans.py --- Python/9thOct_ujjwalhans.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Python/9thOct_ujjwalhans.py diff --git a/Python/9thOct_ujjwalhans.py b/Python/9thOct_ujjwalhans.py new file mode 100644 index 000000000..81f8f236f --- /dev/null +++ b/Python/9thOct_ujjwalhans.py @@ -0,0 +1,12 @@ +def gcd(a,b): + if (b == 0): + return a + if (a == 0): + return b + if (a == b): + return a + if (a > b): + return gcd(a-b, b) + return gcd(a, b-a) +ans=gcd(5,10) +print(ans) From 7b1170cd8fb7eecd20ab50d246072d34f7ea87d0 Mon Sep 17 00:00:00 2001 From: ujjwalhans <56391241+ujjwalhans@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:37:14 +0530 Subject: [PATCH 28/38] Update 9thOct_ujjwalhans.py --- Python/9thOct_ujjwalhans.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/9thOct_ujjwalhans.py b/Python/9thOct_ujjwalhans.py index 81f8f236f..af14028a3 100644 --- a/Python/9thOct_ujjwalhans.py +++ b/Python/9thOct_ujjwalhans.py @@ -1,3 +1,4 @@ +import math def gcd(a,b): if (b == 0): return a @@ -9,4 +10,4 @@ def gcd(a,b): return gcd(a-b, b) return gcd(a, b-a) ans=gcd(5,10) -print(ans) +print(math.factorial(ans)) From 5c80ea1c69b6c36c520dbe6b2ae8ff4663731d45 Mon Sep 17 00:00:00 2001 From: ujjwalhans <56391241+ujjwalhans@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:41:40 +0530 Subject: [PATCH 29/38] Delete 9thOct_ujjwalhans.py --- Python/9thOct_ujjwalhans.py | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 Python/9thOct_ujjwalhans.py diff --git a/Python/9thOct_ujjwalhans.py b/Python/9thOct_ujjwalhans.py deleted file mode 100644 index af14028a3..000000000 --- a/Python/9thOct_ujjwalhans.py +++ /dev/null @@ -1,13 +0,0 @@ -import math -def gcd(a,b): - if (b == 0): - return a - if (a == 0): - return b - if (a == b): - return a - if (a > b): - return gcd(a-b, b) - return gcd(a, b-a) -ans=gcd(5,10) -print(math.factorial(ans)) From 8ad482a2a1b579dfdf204ec629a0e8a0c12e7766 Mon Sep 17 00:00:00 2001 From: ujjwalhans <56391241+ujjwalhans@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:42:34 +0530 Subject: [PATCH 30/38] Create 9thOct_ujjwalhans.py --- Python/2021/9thOct_ujjwalhans.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Python/2021/9thOct_ujjwalhans.py diff --git a/Python/2021/9thOct_ujjwalhans.py b/Python/2021/9thOct_ujjwalhans.py new file mode 100644 index 000000000..af14028a3 --- /dev/null +++ b/Python/2021/9thOct_ujjwalhans.py @@ -0,0 +1,13 @@ +import math +def gcd(a,b): + if (b == 0): + return a + if (a == 0): + return b + if (a == b): + return a + if (a > b): + return gcd(a-b, b) + return gcd(a, b-a) +ans=gcd(5,10) +print(math.factorial(ans)) From 8ebc122116ea0ff73bd7875b0848ba211d45edc9 Mon Sep 17 00:00:00 2001 From: ujjwalhans <56391241+ujjwalhans@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:48:52 +0530 Subject: [PATCH 31/38] Create 9thOct_ujjwalhans.py --- C++/2021/9thOct_ujjwalhans.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 C++/2021/9thOct_ujjwalhans.py diff --git a/C++/2021/9thOct_ujjwalhans.py b/C++/2021/9thOct_ujjwalhans.py new file mode 100644 index 000000000..6f9279293 --- /dev/null +++ b/C++/2021/9thOct_ujjwalhans.py @@ -0,0 +1,27 @@ +#include +int factorial(int n) +{ + int f = 1; + int i; + for (i = 2; i <= n; i++) + f *= i; + return f; +} +int gcd(int a, int b) +{ if (a == 0) + return b; + if (b == 0) + return a; + if (a == b) + return a; + if (a > b) + return gcd(a-b, b); + return gcd(a, b-a); +} + +int main() +{ + int a = 5, b = 120; + printf("%d",factorial(gcd(a, b))); + return 0; +} From e4f03e9d78ac81374f7c4ba2b58244f568fb4e7a Mon Sep 17 00:00:00 2001 From: Ronak Date: Sat, 9 Oct 2021 15:52:09 +0530 Subject: [PATCH 32/38] Created HTML page for 10K subscribers --- .../2021/10k_subscriber_Ronak-Proghammer.html | 154 ++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 HTML CSS/2021/10k_subscriber_Ronak-Proghammer.html diff --git a/HTML CSS/2021/10k_subscriber_Ronak-Proghammer.html b/HTML CSS/2021/10k_subscriber_Ronak-Proghammer.html new file mode 100644 index 000000000..3ec88fd1b --- /dev/null +++ b/HTML CSS/2021/10k_subscriber_Ronak-Proghammer.html @@ -0,0 +1,154 @@ + + + + + + + 10k Subscriber + + + + + + +
+ Why I started Twowaits? + #MyJourney + | Achintya Gaumat +
+
+
+ 5,584 views + + Apr 18,2021 +
+
+ + + 756 + + + + 13 + +
+
+
+
+
+ + Twowaits + 10k subscribers + +
+
+
+                In this I talk about what led me to start Twowaits and what all we do.
+
+                Connect on Linkedin :  https://www.linkedin.com/in/achintya-...
+                
+                Do read more about my work : https://medium.com/twowaits/our-dream...
+
+                SHOW LESS
+            
+ +
+
+ + \ No newline at end of file From ddc25c49fdbc6c7b5a8ce1337e14c383511abec9 Mon Sep 17 00:00:00 2001 From: Disha Sharma <56217410+DishaSharma-dev@users.noreply.github.com> Date: Sat, 9 Oct 2021 15:53:29 +0530 Subject: [PATCH 33/38] GCD of factorial of two numbers code added --- C++/2021/9oct_dishasharma-dev.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 C++/2021/9oct_dishasharma-dev.cpp diff --git a/C++/2021/9oct_dishasharma-dev.cpp b/C++/2021/9oct_dishasharma-dev.cpp new file mode 100644 index 000000000..920856a3c --- /dev/null +++ b/C++/2021/9oct_dishasharma-dev.cpp @@ -0,0 +1,26 @@ +// CPP program to find GCD of factorial of two +#include +using namespace std; + +int factorial(int x) +{ + if (x <= 1) + return 1; + int res = 2; + for (int i = 3; i <= x; i++) + res = res * i; + return res; +} + +int gcdOfFactorial(int m, int n) +{ + return factorial(min(m, n)); +} + +int main() +{ + int m = 5, n = 9; + cout << gcdOfFactorial(m, n); + return 0; +} + From 03427b3afda98124f97d386b156dd09119888174 Mon Sep 17 00:00:00 2001 From: Pankaj Rathore <65541151+olive-green@users.noreply.github.com> Date: Sat, 9 Oct 2021 16:03:10 +0530 Subject: [PATCH 34/38] gcd of factorial of two numbers --- C++/2021/9thOct_Olive-green.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 C++/2021/9thOct_Olive-green.cpp diff --git a/C++/2021/9thOct_Olive-green.cpp b/C++/2021/9thOct_Olive-green.cpp new file mode 100644 index 000000000..8c1a947ac --- /dev/null +++ b/C++/2021/9thOct_Olive-green.cpp @@ -0,0 +1,20 @@ +#include + +using namespace std; + +long long int fact(int n){ + + if(n==0){ + return 1; + } + return n*fact(n-1); +} + +int main(){ + int a,b; + cin>>a>>b; + long long int ans=a>b? fact(b) : fact(a); + cout< Date: Sat, 9 Oct 2021 16:57:16 +0530 Subject: [PATCH 35/38] Attempted the C++ functionality issue --- C++/2021/9thOct_shagun0915.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C++/2021/9thOct_shagun0915.cpp diff --git a/C++/2021/9thOct_shagun0915.cpp b/C++/2021/9thOct_shagun0915.cpp new file mode 100644 index 000000000..15a818c25 --- /dev/null +++ b/C++/2021/9thOct_shagun0915.cpp @@ -0,0 +1,23 @@ +#include +using namespace std; + +int factorial(int num){ + int fact = 1, i; + for(i=1; i<=num; i++) + fact = fact * i; + return fact; +} +int gcd(int x, int y) { + if (y == 0){ + return x; + } + return gcd(y, x % y); +} +int main() { + int a,b; + cin>>a>>b; + int x=factorial(a); + int y=factorial(b); + cout< Date: Sat, 9 Oct 2021 17:24:59 +0530 Subject: [PATCH 36/38] Python Function to find gcd of factorials of two numbers --- Python/2021/9thOct_shagun0915.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Python/2021/9thOct_shagun0915.py diff --git a/Python/2021/9thOct_shagun0915.py b/Python/2021/9thOct_shagun0915.py new file mode 100644 index 000000000..cf79651b9 --- /dev/null +++ b/Python/2021/9thOct_shagun0915.py @@ -0,0 +1,20 @@ +#python program to find GCD of factorials of any two given numbers + +def factorial(num): + fact = 1 + i=1 + while i<=num: + fact = fact * i + i=i+1 + return fact + +def gcd(x,y): + if y == 0: + return x + return gcd(y, x % y) + +a = int(input()) +b = int(input()) +x=factorial(a) +y=factorial(b) +print(gcd(x,y)) From e225da6cd6881cbdd7371285c8a10d90db59bc89 Mon Sep 17 00:00:00 2001 From: Harshita Rathee <72303810+harshita1017@users.noreply.github.com> Date: Sat, 9 Oct 2021 17:27:45 +0530 Subject: [PATCH 37/38] commit to the first issue --- 9thOctharshita1017.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 9thOctharshita1017.py diff --git a/9thOctharshita1017.py b/9thOctharshita1017.py new file mode 100644 index 000000000..37c188415 --- /dev/null +++ b/9thOctharshita1017.py @@ -0,0 +1,13 @@ +# You are given two number a and b, you have to print the GCD of the factorials of these two numbers. +# Print the number on the basis of sample I/O provided below. + +import math + + +def gcdoffact(n1, n2): + return math.factorial(min(n1, n2)) + + +number1 = int(input("Enter first number :")) +number2 = int(input("Enter second number :")) +print(gcdoffact(number1, number2)) \ No newline at end of file From 47b507fb04fe2cbb903f99bd3b8400ea2e91b962 Mon Sep 17 00:00:00 2001 From: Harshita Rathee <72303810+harshita1017@users.noreply.github.com> Date: Sat, 9 Oct 2021 17:30:28 +0530 Subject: [PATCH 38/38] Rename 9thOctharshita1017.py to Python/2021/9thOctharshita1017.py --- 9thOctharshita1017.py => Python/2021/9thOctharshita1017.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename 9thOctharshita1017.py => Python/2021/9thOctharshita1017.py (90%) diff --git a/9thOctharshita1017.py b/Python/2021/9thOctharshita1017.py similarity index 90% rename from 9thOctharshita1017.py rename to Python/2021/9thOctharshita1017.py index 37c188415..e7241c5c7 100644 --- a/9thOctharshita1017.py +++ b/Python/2021/9thOctharshita1017.py @@ -10,4 +10,4 @@ def gcdoffact(n1, n2): number1 = int(input("Enter first number :")) number2 = int(input("Enter second number :")) -print(gcdoffact(number1, number2)) \ No newline at end of file +print(gcdoffact(number1, number2))