1
0
This commit is contained in:
2022-12-01 00:59:58 -05:00
parent 25fb122377
commit 95db0b1fa8
4 changed files with 55 additions and 8 deletions
+25
View File
@@ -0,0 +1,25 @@
#include <iostream>
#include <string>
int main(int argc, char* argv[])
{
std::string line;
int total = 0;
int max = 0;
while(std::getline(std::cin, line))
{
if (0 == line.size())
{
if (total > max)
{
max = total;
}
total = 0;
}
else
{
total += stoi(line);
}
}
std::cout << max << std::endl;
}