Skip to content

Commit 4a0e535

Browse files
committed
solution of problem A in Codechef Sept Starters 2021
1 parent ff7733f commit 4a0e535

File tree

1 file changed

+37
-0
lines changed
  • Codechef/StartersSept2021

1 file changed

+37
-0
lines changed

Codechef/StartersSept2021/A.java

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package StartersSept2021;
2+
3+
import java.util.Scanner;
4+
5+
public class A {
6+
7+
public static void main(String[] args) {
8+
9+
Scanner sc = new Scanner(System.in);
10+
11+
int t = sc.nextInt();
12+
13+
for (int tt = 0; tt < t; tt++) {
14+
15+
int xsec = sc.nextInt();
16+
17+
int position = xsec % 4;
18+
19+
switch (position) {
20+
case 0:
21+
System.out.println("North");
22+
break;
23+
case 1:
24+
System.out.println("East");
25+
break;
26+
case 2:
27+
System.out.println("South");
28+
break;
29+
case 3:
30+
System.out.println("West");
31+
break;
32+
}
33+
}
34+
sc.close();
35+
}
36+
37+
}

0 commit comments

Comments
 (0)