开始 2024-01-26 08:00:00

冬令营1.26while循环

结束 2024-01-26 12:00:00
Contest is over.
当前 2025-06-17 16:06:13

比赛打表哥刘一诺

include

using namespace std; int qsq(int a, int b) {

int c=1;
while (c != 0)
{
	c = a % b;
	a = b;
	b = c;
}
return a;

} int main() {

int a, b, x;
cin >> a >> b;
x = a * b / qsq(a, b);
cout << qsq(a, b) <<" ";
cout << x << endl;
return 0;

}


lyhbylz  •  1年前

666666


7iok  •  1年前

比赛已结束。