1 solutions
-
0
C++ :
#include<iostream> #include<cstdlib> using namespace std; int main() { long long m,n,t; cin>>m>>n; long long a=m,b=n; int r=m%n; while(r!=0) { m=n; n=r; r=m%n; } t=(a*b)/n; cout<<t; //system("pause"); return 0; }Pascal :
var a,b,c,d:longint; begin readln(a,b); c:=1; d:=a*c; while d mod b<>0 do begin c:=c+1; d:=a*c; end; writeln(d); end.
- 1
Information
- ID
- 17767
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By