33 lines
646 B
C
33 lines
646 B
C
|
#include <stdint.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(int argc, char **argv) {
|
||
|
int n, m;
|
||
|
scanf("%d %d", &n, &m);
|
||
|
|
||
|
int ingredients = 0;
|
||
|
|
||
|
for (int i = 0; i < n; i++) {
|
||
|
for (int j = 0; j < m; j++) {
|
||
|
|
||
|
char c;
|
||
|
scanf(" %c", &c);
|
||
|
if (c == '.') {
|
||
|
ingredients += 20;
|
||
|
} else if (c == 'O') {
|
||
|
ingredients += 10;
|
||
|
} else if (c == '\\' || c == '/') {
|
||
|
ingredients += 25;
|
||
|
} else if (c == 'A') {
|
||
|
ingredients += 35;
|
||
|
} else if (c == '^') {
|
||
|
ingredients += 5;
|
||
|
} else if (c == 'v') {
|
||
|
ingredients += 22;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
printf("%d\n", ingredients);
|
||
|
|
||
|
return 0;
|
||
|
}
|