fork download
  1. #include <stdio.h>
  2.  
  3. int foo_bit(){
  4. int res = 0, i;
  5. for(i = 0; i < 2147483647; i++){
  6. res = res | i;
  7. } return res;
  8. }
  9.  
  10. int foo_gen(){
  11. int res = 0, i;
  12. for(i = 0; i < 2147483647; i++){
  13. res = res + i;
  14. } return res;
  15. }
  16.  
  17. int main(void) {
  18. printf("%d", foo_bit());
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 1.87s 2292KB
stdin
Standard input is empty
stdout
2147483647