-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProblem118A.java
More file actions
38 lines (35 loc) · 811 Bytes
/
Copy pathProblem118A.java
File metadata and controls
38 lines (35 loc) · 811 Bytes
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
package CodeForces;
import java.util.*;
public class Problem118A
{
public static String Petya(String s)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < s.length(); i++)
{
char a = s.charAt(i);
int ascii = (int) a;
if (ascii == 65 || ascii == 97 || ascii == 69 || ascii == 101 || ascii == 73 || ascii == 105 || ascii == 79 || ascii == 111 || ascii == 85 || ascii == 117 || ascii == 89 || ascii == 121)
{
}
else if (ascii >= 65 && ascii <= 90)
{
sb.append('.');
sb.append(Character.toLowerCase(a));
}
else
{
sb.append('.');
sb.append(a);
}
}
return sb.toString();
}
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
String s = scan.next();
scan.close();
System.out.println(Petya(s));
}
}