summaryrefslogtreecommitdiffstats
path: root/01-algorithmic_toolbox/01-intro/04-lcm
diff options
context:
space:
mode:
Diffstat (limited to '01-algorithmic_toolbox/01-intro/04-lcm')
-rw-r--r--01-algorithmic_toolbox/01-intro/04-lcm/lcm.cpp13
-rw-r--r--01-algorithmic_toolbox/01-intro/04-lcm/tests/011
-rw-r--r--01-algorithmic_toolbox/01-intro/04-lcm/tests/01.a1
-rw-r--r--01-algorithmic_toolbox/01-intro/04-lcm/tests/021
-rw-r--r--01-algorithmic_toolbox/01-intro/04-lcm/tests/02.a1
5 files changed, 17 insertions, 0 deletions
diff --git a/01-algorithmic_toolbox/01-intro/04-lcm/lcm.cpp b/01-algorithmic_toolbox/01-intro/04-lcm/lcm.cpp
new file mode 100644
index 0000000..c6f503c
--- /dev/null
+++ b/01-algorithmic_toolbox/01-intro/04-lcm/lcm.cpp
@@ -0,0 +1,13 @@
+#include <iostream>
+
+long long lcm(int a, int b) {
+ //write your code here
+ return a*b;
+}
+
+int main() {
+ int a, b;
+ std::cin >> a >> b;
+ std::cout << lcm(a, b) << std::endl;
+ return 0;
+}
diff --git a/01-algorithmic_toolbox/01-intro/04-lcm/tests/01 b/01-algorithmic_toolbox/01-intro/04-lcm/tests/01
new file mode 100644
index 0000000..20a8108
--- /dev/null
+++ b/01-algorithmic_toolbox/01-intro/04-lcm/tests/01
@@ -0,0 +1 @@
+6 8
diff --git a/01-algorithmic_toolbox/01-intro/04-lcm/tests/01.a b/01-algorithmic_toolbox/01-intro/04-lcm/tests/01.a
new file mode 100644
index 0000000..a45fd52
--- /dev/null
+++ b/01-algorithmic_toolbox/01-intro/04-lcm/tests/01.a
@@ -0,0 +1 @@
+24
diff --git a/01-algorithmic_toolbox/01-intro/04-lcm/tests/02 b/01-algorithmic_toolbox/01-intro/04-lcm/tests/02
new file mode 100644
index 0000000..4154bdb
--- /dev/null
+++ b/01-algorithmic_toolbox/01-intro/04-lcm/tests/02
@@ -0,0 +1 @@
+28851538 1183019
diff --git a/01-algorithmic_toolbox/01-intro/04-lcm/tests/02.a b/01-algorithmic_toolbox/01-intro/04-lcm/tests/02.a
new file mode 100644
index 0000000..4b84195
--- /dev/null
+++ b/01-algorithmic_toolbox/01-intro/04-lcm/tests/02.a
@@ -0,0 +1 @@
+1933053046