60分超时
查看原帖
60分超时
1049768
qiongjing楼主2024/4/12 13:27

60分其他超时,求大佬解

#include<bits/stdc++.h>
using namespace std;

int main()
{
	long a;bool b=0,c=0;
	cin>>a;
	for(int i=1;i<sqrt(a);i++)
	{
		for(int j=1;j<a;j++)
		{
			if(i*j==a&&i!=j)
			{
				cout<<j;return 0;
			}
		 } 
	}
	return 0;
}

2024/4/12 13:27
加载中...