TLE求助
查看原帖
TLE求助
1404086
THEONE_k楼主2024/8/1 10:16

为什么会超时呢?

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,x;
	cin>>n;
	x=n-1;
	
	while(n%x)
	{
		x--;
	}
	cout<<x;
	
	return 0;
}
2024/8/1 10:16
加载中...