fork(1) download
  1. #include <bits/stdc++.h>
  2. int main() {
  3. int delta; std::cin >> delta;
  4. int64_t sum(0), max(0);
  5. for (int iter = 0; iter < (int)1e9; iter++) {
  6. sum += delta;
  7. max = std::max(max, sum);
  8. }
  9. std::cout << max << std::endl;
  10. return 0;
  11. }
Success #stdin #stdout 0.88s 4320KB
stdin
100
stdout
100000000000