Advertisement
Matvey_Kozvonin

dz 10

Jan 21st, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. Program n1;
  2. var n,m,i,j: integer;
  3. f: byte;
  4. begin
  5. readln(n);
  6. readln(m);
  7. f:=0;
  8. for i:=m-1 downto 1 do begin
  9. for j:=i-1 downto 1 do if(i*i*i-j*j*j=n) then begin
  10. write('YES');
  11. f:=1;
  12. break;
  13. end;
  14. if (f=1) then break;
  15. end;
  16. if (f=0) then write('NO');
  17. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement