-
Notifications
You must be signed in to change notification settings - Fork 0
/
1316.js
46 lines (34 loc) · 768 Bytes
/
1316.js
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
45
46
const { off } = require('process');
const readline = require('readline');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
const data=[]
rl.on('line', (input) => {
data.push(input)
}).on('close',()=>{
let count=Number(data[0])
let result=0;
for(let i=1; i<=count; i++){
let word=data[i]
let status=true;
let letter=[]
for(let j=0; j<word.length; j++){
if(letter.indexOf(word[j]) == -1){
letter.push(word[j])
}
else{
if(letter.indexOf(word[j]) != (letter.length)-1 ){
status=false
break;
}
}
}
if(status){
result++;
}
}
console.log(result);
process.exit();
})