为什么TLE
查看原帖
为什么TLE
525998
huangjiasheng楼主2022/3/3 18:22

为什么呢???

/*****************************************
Node:

******************************************/
#include <queue>
#include <math.h>
#include <stack>
#include <stdio.h>
#include <iostream>
#include <vector>
#include <iomanip>
#include <string.h>
#include <algorithm>
using namespace std;
#define LL long long
const int N = 1e6 + 10;
const int INF = 0x3f3f3f3f;
void f(int id)
{
	for(int i=2;i<=id-1;i++)
    {
		if(id%i==0) 
		{
	    	cout<<id/i;
	        break;
    	}
    }
	return;
}
int main() 
{
    int n;
    cin>>n;
    f(n);
    return 0;
}


2022/3/3 18:22
加载中...