| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 56371 | yuboyuan | 最大公约数、最小公倍数 | C++ | Runtime Error | 0 MS | 240 KB | 265 | 2024-11-10 18:45:37 |
#include<iostream> using namespace std; int main() { int a,b,a0,b0; cin>>a>>b; a0=a; b0=b; while(a0*b0!=0) { if(a0>=b0) a0%=b0; else b0%=a0; } if(a==0) a0=b0; cout<<a0<<","<<a*b/a0; return 0; }