24 lines
322 B
C
24 lines
322 B
C
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
|
||
|
int main () {
|
||
|
char cur[20];
|
||
|
int cur_sum = 0;
|
||
|
int max = 0;
|
||
|
|
||
|
while (fgets(cur,20,stdin) != NULL) {
|
||
|
if (strlen(cur) > 1) {
|
||
|
cur_sum += atoi(cur);
|
||
|
if (cur_sum > max) {
|
||
|
max = cur_sum;
|
||
|
}
|
||
|
} else {
|
||
|
cur_sum = 0;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
printf("%d\n", max);
|
||
|
|
||
|
}
|