| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 40978 | YOYOLEE-李昕颖 | 最大公约数、最小公倍数 | C++ | Accepted | 1 MS | 248 KB | 250 | 2024-02-18 12:01:11 |
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,m,n; cin>>a>>b; for(int i=2;i<=min(a,b);i++){ if(a%i==0&&b%i==0) m=i; } n=a*b/m; cout<<m<<","<<n; return 0; } /* 笔记 大小写差32 0:48 A:65 */