aboutsummaryrefslogtreecommitdiff
path: root/problem206.erl
blob: c6432f385bca98656e6ec627d05b29c152f0c609 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-module(problem206).
-export([solve/0]).

solve() ->
	work(1).

work(N) ->
	S = N * N,
	test(N,integer_to_list(S)).

test(N, [49,_,50,_,51,_,52,_,53,_,54,_,55,_,56,_,57,_,48]) ->
	N;
test(N, _) ->
	work(N + 1).