U E D R , A S I H C RSS

Light More Light/문보창

소�

2005/02/19 Accepted 0:00.613 448
간단한 문제였으나, 처ì�Œì—� 문제 ë„ì„�ì�„ 잘못하여 시간ì�„ 소비했다. 정수론 문제ì�˜ 경우 문제ë„ì„�ë§Œ 잘해 준다면 ì�˜ì™¸ë¡œ 쉽게 풀리는 것 같다. 수행시간과 메모리 사용량ì�´ 많다. 보다 좋ì�€ 알고리즘ì�„ ìƒ�ê°�해야 한다.

코드

~cpp 
// no10110 - Light, more Light
#include <iostream>
#include <cmath>
using namespace std;
int main()
{	
	unsigned int n;
	while (cin >> n)
	{
		if (n == 0)
			break;
		if (int(sqrt(n)) == double(sqrt(n)))
			cout << "yes\n";
		else
			cout << "no\n";
	}
	return 0;
}

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:23:38
Processing time 0.0084 sec