Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {Волкович Максим (volkovcih.maksim.s@gmail.com), 112гр., v1.0,
- ввести в возрастающем порядке целые числа от 1 до 10000, представимые в виде sqr(n)+sqr(m)}
- program t_14_31_v1 (input,output);
- var n,m:0..100;
- st1,st2: set of 1..10000;
- s:1..10000;
- begin
- st1:=[];
- st2:=[];
- for m:=0 to 100 do st1:=st1+[sqr(m)];
- for s:=1 to 10000 do
- for n:=0 to 100 do
- if ((s-sqr(n)) in st1) and (not(s in st2)) then
- begin write(s,' '); st2:=st2+[s]; end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement