fork(1) download
  1. #include <iostream>
  2. #include <cassert>
  3. #include <cctype>
  4. using namespace std;
  5.  
  6. unsigned int get_uint(const std::string &s) {
  7. unsigned int r = 0U;
  8. for(auto c : s) {
  9. assert(std::isdigit(c));
  10. r = r * 10 + (c - '0');
  11. }
  12. return r;
  13. }
  14.  
  15. int main() {
  16. cout << get_uint("5000000000") << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3272KB
stdin
Standard input is empty
stdout
705032704