Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
72382 laichihao 最大公约数和最小公倍数问题 C++ 通过 0 MS 240 KB 297 2025-10-31 17:19:57

Tests(5/5):


#include<iostream> using namespace std; int main() { int x0,y0,x,i=2,k=0; cin>>x0>>y0; if(y0%x0!=0) { cout<<0; return 0; } x=y0/x0; while(x!=1) { while(x%i!=0)i++;k++; while(x%i==0)x/=i; } cout<<k*2; return 0; }


测评信息: