import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class V {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
String[] textArray = br.readLine().split(" ");
StringBuilder builder = new StringBuilder();
for (String text : textArray) {
for (int i = 1; i < text.length(); i += 2) { // 더미 무시
int y = text.charAt(i - 1) - 'a';
int z = text.charAt(i) - 'a';
char x = (char) ('a' + (26 + y + z - n) % 26);
builder.append(x);
}
builder.append(" ");
}
System.out.println(builder.toString());
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
12148 KB |
Output is correct |
2 |
Correct |
83 ms |
11820 KB |
Output is correct |
3 |
Correct |
96 ms |
11924 KB |
Output is correct |
4 |
Correct |
83 ms |
11896 KB |
Output is correct |
5 |
Correct |
92 ms |
12008 KB |
Output is correct |
6 |
Correct |
85 ms |
11920 KB |
Output is correct |
7 |
Correct |
83 ms |
12024 KB |
Output is correct |
8 |
Correct |
84 ms |
12176 KB |
Output is correct |
9 |
Correct |
85 ms |
12024 KB |
Output is correct |
10 |
Correct |
85 ms |
12032 KB |
Output is correct |
11 |
Correct |
84 ms |
12024 KB |
Output is correct |
12 |
Correct |
81 ms |
12008 KB |
Output is correct |
13 |
Correct |
83 ms |
12156 KB |
Output is correct |
14 |
Correct |
85 ms |
12152 KB |
Output is correct |
15 |
Correct |
83 ms |
11900 KB |
Output is correct |
16 |
Correct |
84 ms |
12040 KB |
Output is correct |
17 |
Correct |
87 ms |
12152 KB |
Output is correct |
18 |
Correct |
81 ms |
12176 KB |
Output is correct |
19 |
Correct |
85 ms |
11920 KB |
Output is correct |
20 |
Correct |
104 ms |
11892 KB |
Output is correct |
21 |
Correct |
84 ms |
12048 KB |
Output is correct |
22 |
Correct |
83 ms |
12028 KB |
Output is correct |
23 |
Correct |
95 ms |
12416 KB |
Output is correct |
24 |
Correct |
82 ms |
12028 KB |
Output is correct |
25 |
Correct |
85 ms |
12048 KB |
Output is correct |
26 |
Correct |
83 ms |
11896 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
86 ms |
12052 KB |
Output is correct |
2 |
Correct |
90 ms |
12024 KB |
Output is correct |
3 |
Correct |
90 ms |
12300 KB |
Output is correct |
4 |
Correct |
90 ms |
12152 KB |
Output is correct |
5 |
Correct |
93 ms |
12296 KB |
Output is correct |
6 |
Correct |
88 ms |
12128 KB |
Output is correct |
7 |
Correct |
90 ms |
12024 KB |
Output is correct |
8 |
Correct |
89 ms |
12176 KB |
Output is correct |
9 |
Correct |
93 ms |
12304 KB |
Output is correct |
10 |
Correct |
91 ms |
12020 KB |
Output is correct |
11 |
Correct |
105 ms |
11924 KB |
Output is correct |
12 |
Correct |
92 ms |
12392 KB |
Output is correct |
13 |
Correct |
92 ms |
12316 KB |
Output is correct |
14 |
Correct |
88 ms |
12176 KB |
Output is correct |
15 |
Correct |
87 ms |
11896 KB |
Output is correct |
16 |
Correct |
93 ms |
12148 KB |
Output is correct |
17 |
Correct |
92 ms |
11924 KB |
Output is correct |
18 |
Correct |
92 ms |
12304 KB |
Output is correct |
19 |
Correct |
91 ms |
12284 KB |
Output is correct |
20 |
Correct |
89 ms |
12024 KB |
Output is correct |
21 |
Correct |
98 ms |
12252 KB |
Output is correct |
22 |
Correct |
97 ms |
12560 KB |
Output is correct |
23 |
Correct |
91 ms |
12404 KB |
Output is correct |
24 |
Correct |
90 ms |
12044 KB |
Output is correct |
25 |
Correct |
94 ms |
12152 KB |
Output is correct |
26 |
Correct |
91 ms |
12048 KB |
Output is correct |