fork(2) download
  1. //*******************************************************************
  2. // NOTE: please read the 'More Info' tab to the right for shortcuts.
  3. //*******************************************************************
  4.  
  5. import java.lang.Math; // headers MUST be above the first class
  6.  
  7. public class Main {
  8.  
  9. static Runnable lambda = ()->{long b=3,c,n;for(;;){for(n=1;;n++){c=b+2*n*n;double d=Math.sqrt(c*c-b*b);if(d==(int)d&b<d){System.out.println(b);break;}}b=c;}};
  10.  
  11. public static void main(String[] args) {
  12. lambda.run();
  13. }
  14. }
Time limit exceeded #stdin #stdout 5s 974336KB
stdin
Standard input is empty
stdout
3
5
13
85
157
12325
90733
2449525
28455997