Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <string>
- #include <fstream>
- #include <sstream>
- #include <list>
- using namespace std;
- ifstream in("input.txt");
- ofstream out("output.txt");
- int main() {
- string s;
- int c = 0;
- int maxim = -10000000000000;
- getline(in, s);
- for (int i = 0; i < s.length(); i++) {
- if (s[i] <= 57 && s[i] >= 48) {
- c++;
- }
- else {
- maxim = max(c, maxim);
- c = 0;
- }
- }
- out << maxim;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement