Website Summary Files Commits Branches @commit @diff @stats
path: root / Week06 / Exercise01.cpp
blob: a876a5339eb38b91e1cab24f1b0e41370d1e5427 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>

int main() {
	unsigned int result = 0;

	for (unsigned int integer = 1; result == 0; integer++) {
		unsigned int square = integer * integer;
		if (square % 1000000 == 269696)
			result = integer;
	}

	std::cout << result << std::endl;

	return 0;
}