From 415994d75291de9566497660dbfc8df3a9f6b168 Mon Sep 17 00:00:00 2001 From: urokodakigithub Date: Wed, 1 May 2024 22:01:38 +0530 Subject: [PATCH 1/2] this is the solution of question 2 --- question-2/solution-2.cpp | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 question-2/solution-2.cpp diff --git a/question-2/solution-2.cpp b/question-2/solution-2.cpp new file mode 100644 index 0000000..88aa59e --- /dev/null +++ b/question-2/solution-2.cpp @@ -0,0 +1,27 @@ +#include +using namespace std; + +int count_trailing_zeroes(int n) { + int zeroes = 0; + int i = 5; + while (n / i > 0) { + zeroes += n / i; + i *= 5; + } + return zeroes; +} + +int main() { + int t; + cin >> t; // Input number of test cases + + while (t>0) { + int n; + cin >> n; // Input number n + // Output + cout << count_trailing_zeroes(n) << endl; + t--; + } + + return 0; +} From 38a443caa3e81e10062897d79e8d90b51dd81c69 Mon Sep 17 00:00:00 2001 From: Kodaki <159033884+urokodakigithub@users.noreply.github.com> Date: Wed, 1 May 2024 22:19:14 +0530 Subject: [PATCH 2/2] Create README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e7417b9 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Solution to the second Problem + +hope shabd improves his movie taste tho :)