← Back to List

8320번: 직사각형을 만드는 방법 ↗

Solutions

C++14
214 B | 214 chars
#include <iostream>
using namespace std;
int N,S;
int main()
{
	cin>>N;
	for(int x=1; x*x<=N; x++)
	{
		for(int y=x; y<=N; y++)
		{
			if(x*y<=N) 
			{
				S++;
				//cout<<x<<" "<<y<<endl;
			}
		}
	}
	cout<<S;
}