leetcode/2022/day01/test.c
2022-12-17 01:16:18 +01:00

14 lines
250 B
C

#include <stdio.h>
#include <stdlib.h>
int main()
{
int i;
char *line = NULL;
size_t len = 0;
while (getline(&line, &len, stdin) >= 0) {
if ( line[0] == '\n' ) printf("newline\n");
printf("%d\n", atoi(line));
}
}