Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
15573 | 马德理666 | 分田地 | C++ | Accepted | 0 MS | 248 KB | 203 | 2023-04-23 22:39:07 |
#include<bits/stdc++.h> using namespace std; int main() { int a,b,n=0,c=0; cin>>a>>b; for(int i=1;i<=a;i++){ if(a%i==0&&b%i==0){ if(c<i) c=i; } } cout<<(b/c)*(a/c); return 0; }