#include <stdio.h> int main() { int n=0; scanf("%d ", &n); int sequence = n/10; int result = 0; for(int t=0; t < 10; t++) { int point = 1; for(int i=0; i < sequence; i++){ char c; scanf("%c ", &c); if(c == 'N') point = 0; } result += point; } printf("%d\n", result); return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #include <stdio.h> int main() { int n=0; scanf("%d ", &n); int sequence = n/10; int result = 0; for(int t=0; t < 10; t++) { int point = 1; for(int i=0; i < sequence; i++){ char c; scanf("%c ", &c); if(c == 'N') point = 0; } result += point; } printf("%d\n", result); return 0; } |