blob: 0438304f064d23f6341bfc4f28a7c527e8ab9593 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
#include <stdio.h>
int main()
{
size_t x, y, s = 0;
while (scanf("%*[^m]") != EOF)
if (scanf("mul(%3zu,%3zu", &x, &y) == 2 && getchar() == ')')
s += x * y;
printf("%zu\n", s);
return 0;
}
|