1 solutions
-
0
Pascal :
var i,m,j,s,c,k:integer; a,b:real; x1,x2:boolean; begin for i:=1000 to 9999 do begin x1:=false; x2:=false; a:=i div 100; s:=i; m:=0; for j:=1 to 4 do begin k:=s mod 10; s:=s div 10; m:=m+k end; for c:=1 to 10 do begin if sqr(c)=m then x1:=true; if sqr(c)=a then x2:=true; end; if x1 and x2 then writeln(i); end; end.
- 1
Information
- ID
- 17319
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By