fork download
  1. import java.math.*;
  2. class M{
  3. static String c(){
  4. String r = "";
  5. x,
  6. p;
  7. for(int i = 2; i < 102;){
  8. r += t+" ";
  9. p = (t = t.add(x = new BigInteger(i++ + "")));
  10. t = x(p, 2)
  11. ? t.add(x)
  12. : t;
  13. t = x(p, 3)
  14. ? t.subtract(x)
  15. : t;
  16. t = x(p, 4)
  17. ? t.multiply(x)
  18. : t;
  19. }
  20. return r;
  21. }
  22.  
  23. public static void main(String[] a){
  24. System.out.println(c());
  25. }
  26.  
  27. static boolean x(BigInteger p, int i){
  28. return p.mod(new BigInteger(i+"")).compareTo(BigInteger.ONE) < 0;
  29. }
  30. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
1 1 21 25 30 216 223 223 2169 2179 2190 2202 2215 2215 2245 2261 2295 2295 2333 2353 2395 2417 56649 56649 56699 56725 1533033 1533061 1533090 45993600 45993631 45993631 1517792001 1517792035 1517792070 1517792106 1517792143 1517792143 1517792221 1517792261 1517792343 1517792343 1517792429 1517792473 1517792563 1517792609 71336257041 71336257041 71336257139 71336257189 3638149121841 3638149121893 3638149121946 196460052588000 196460052588055 196460052588055 11198222997525633 11198222997525691 11198222997525750 11198222997525810 11198222997525871 11198222997525871 11198222997525997 11198222997526061 11198222997526191 11198222997526191 11198222997526325 11198222997526393 11198222997526531 11198222997526601 795073832824398753 795073832824398753 795073832824398899 795073832824398973 59630537461829934225 59630537461829934301 59630537461829934378 4651181922022734887568 4651181922022734887647 4651181922022734887647 376745735683841525912529 376745735683841525912611 376745735683841525912694 376745735683841525912778 376745735683841525912863 376745735683841525912863 376745735683841525913037 376745735683841525913125 376745735683841525913303 376745735683841525913303 376745735683841525913485 376745735683841525913577 376745735683841525913763 376745735683841525913857 35790844889964944961834465 35790844889964944961834465 35790844889964944961834659 35790844889964944961834757 3543293644106529551221660545 3543293644106529551221660645