fork download
  1. import java.lang.*;
  2. import java.util.*;
  3.  
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. Integer a,b,c=100;
  9. while(c-->0)
  10. {
  11. a=c*(c+1)*(c+2)%10000/10;
  12. b=c*(c+1)*(c+2)%10000/10;
  13. if(a==b)
  14. System.out.println("yes!");
  15. else
  16. System.out.println("no...");
  17. }
  18. }
  19. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
no...
yes!
yes!
no...
no...
no...
yes!
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
yes!
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
yes!
no...
no...
no...
yes!
no...
no...
yes!
no...
no...
no...
no...
no...
no...
no...
yes!
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
yes!
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
no...
yes!
yes!
yes!
yes!
yes!
yes!
yes!
yes!
yes!
yes!