repl.it
C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <stdio.h>
#include<stdlib.h>

int main(){
	char s[100005];
	int r[50005];

	int mod = 1000000007;
	scanf("%s", s);
	int j = 0; 
	int c;
	for(int i = 0; s[i] != '\0'; i++){
		if(s[i] == 'u'){
			c = 1;
			while(s[i+1] != '\0' && s[i+1] == 'u'){
				c += 1;
				i++;
			}
			if(c != 1){
				r[j] = c;
				j++;
			}
		}

		else if(s[i] == 'n'){
			c = 1;
			while(s[i+1] != '\0' && s[i+1] == 'n'){
				c += 1;
				i++;
			}
			if(c != 1){
				r[j] = c;
				j++;
			}
		}
	}

	if(j == 0)
		printf("1\n");
	else{
		
	}
	return 0;
}