fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. long long s = 0;
  5.  
  6. for (int i = 1; i <= 1000000; i++) {
  7. s += i;
  8. }
  9.  
  10. printf("合計: %lld\n", s);
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 5320KB
stdin
stdout
合計: 500000500000