Advertisement
volkovich_maksim

t_14_31_v1_volkovich

Nov 16th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.54 KB | None | 0 0
  1. {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
  2. ввести в возрастающем порядке целые числа от 1 до 10000, представимые в виде sqr(n)+sqr(m)}
  3. program t_14_31_v1 (input,output);
  4. var n,m:0..100;
  5.  st1,st2: set of 1..10000;
  6.  s:1..10000;
  7. begin
  8.   st1:=[];
  9.   st2:=[];
  10.   for m:=0 to 100 do st1:=st1+[sqr(m)];
  11.   for s:=1 to 10000 do
  12.      for n:=0 to 100 do
  13.       if ((s-sqr(n)) in st1) and (not(s in st2)) then
  14.       begin write(s,' '); st2:=st2+[s]; end;
  15. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement