mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
1b77522684
4800-4899
18 lines
387 B
C++
18 lines
387 B
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
char c;
|
|
char a[5];
|
|
int main() {
|
|
a[5] = '\0';
|
|
int ans = 0;
|
|
while ((c = getchar()) != EOF) {
|
|
if (c >= 'a' && c <= 'z') c -= 32;
|
|
a[3] = c;
|
|
if (strcmp(a, "DOGE") == 0) ans++;
|
|
for (int i = 0; i < 3; i++)
|
|
a[i] = a[i + 1];
|
|
}
|
|
printf("%d\n", ans);
|
|
return 0;
|
|
}
|