|
|
back to boardC answer #include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char name[20]; int N; scanf("%d", &N); int cost=200; int $=0; for(int i=0; i<N; i++) { scanf("%s", name); if(name[strlen(name)-4]=='+'&&name[strlen(name)-3]=='o'&&name[strlen(name)-2]=='n'&&name[strlen(name)-1]=='e') { cost=cost+200; } else { cost=cost+100; } } $=$+cost; if($==1300) { $=$+100; } printf("%d", $); return 0; } |
|
|