Бодолт илгээх | Бүх бодолтууд | Шилдэг бодолтууд | Жагсаалт руу буцах |
RGB7314 - ХБЕХ |
Өгөгдсөн хоёр натурал тооны хамгийн бага ерөнхий хуваагдагчийг ол.
Input
Нэг мөрөнд хоёр натурал тоо зайгаар тусгаарлагдан өгөгдөнө.
Output
ХБЕХ
Example
Input: 9 15 Output: 45
Нэмсэн: | Bataa |
Огноо: | 2013-01-11 |
Хугацааны хязгаарлалт: | 1s |
Эх кодын хэмжээний хязгаарлалт: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Програмчлалын хэлүүд: | ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE |
hide comments
|
||||||||||
2024-12-10 05:35:34
import math a, b = map(int, input().split()) lcm = (a * b) // math.gcd(a, b) print(lcm) |
||||||||||
2024-09-10 02:50:46
#include<stdio.h> int main() { int n,m,s; scanf("%d %d",&n,&m); s=n; while(true) { if(s%n==0 && s%m==0) break; s++; } printf("%d",s); system("pause"); return 0; } |
||||||||||
2024-08-18 06:28:59
#include<bits/stdc++.h> using namespace std; long long a,b,c,d,e,f,x,y,z,w,s,k; signed main () { cin>>a>>b; c=a; d=b; while(a>0 && b>0) { if (a>b) a=a%b; else b=b%a; } if (a==0) cout<<(c*d)/b; else cout<<(c*d)/a; } }huul2 |
||||||||||
2024-07-18 14:29:13
#include <stdio.h> main(){ int n, m, n1, m1, t; scanf("%d%d", &n, &m); n1 = n; m1 = m; while(n != m){ if(n > m){ n = n - m; } else{ m = m - n; } } n1 = n1 / n; m1 = m1 / n; t = n1 * n * m1; printf("%d", t); } |
||||||||||
2024-06-05 07:57:42
▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓ 2024-04-15 06:53:44 sup neggas Leave a Comment |Notes:| 1. Don't post any source code here.| 2. Please be careful, leave short comments only. Don't spam here.| 3. For more discussion (hints, ideas, solutions) please visit our forum.| 4. Authors are allowed to delete the post and use html code here (e.g. to provide some useful links).| About SPOJ RSS |
||||||||||
2024-05-20 03:44:33
▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓ |
||||||||||
2024-05-09 04:26:22
#include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cmath> using namespace std; // Headers string toString (double); int toInt (string); double toDouble (string); int main() { int davhar, ail, toot, x, y; cin >> davhar; cin >> ail; cin >> toot; if (toot % ail == 0) { x = (int) ((double) toot / ail); y = ail; } else { x = (int) ((double) toot / ail + 1); y = toot % ail; } cout << x << endl; cout << y << endl; return 0; } // The following implements type conversion functions. string toString (double value) { //int also stringstream temp; temp << value; return temp.str(); } int toInt (string text) { return atoi(text.c_str()); } double toDouble (string text) { return atof(text.c_str()); } |
||||||||||
2024-05-03 06:59:14
▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓▒▓▓▓ |
||||||||||
2024-05-02 03:49:28
h Last edit: 2024-05-02 04:01:03 |
||||||||||
2024-05-01 08:34:02
pls give me code |