RE? Why?
查看原帖
RE? Why?
1252065
Badsilver楼主2024/5/24 20:24

It's killing me.

P.S. I'm a noob.

#include<iostream>
using namespace std;
int numlist[1001];
int main()
{
	int a;
	cin>>a;
	for(int i=1;i<=a;i++)
	{
		for(int j=1;j<=i;j++)
		{
			if(i*j==a)
			{
				numlist[i]=i;
				numlist[j]=j;
			}
			else
			{
				continue;
			}
		}
	}
	for(int q=1;q<=1001;q++)
	{
		if(numlist[q]==0)
		{
			continue;
		}
		else
		{
			cout<<numlist[q]<<'\n';
		}
	}
	return 0; 
}
2024/5/24 20:24
加载中...