-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDivideTheCake.java
More file actions
28 lines (24 loc) · 807 Bytes
/
DivideTheCake.java
File metadata and controls
28 lines (24 loc) · 807 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
package problems.codechef;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Created by arpit on 25/12/16.
*/
public class DivideTheCake {
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t,n;
t=Integer.parseInt(br.readLine());
while (t-->0){
n=Integer.parseInt(br.readLine());
if (360%n==0) System.out.print('y' + " ");
else System.out.print('n'+" ");
if (n<=360)System.out.print('y'+" ");
else System.out.print('n'+" ");
if (n*(n+1)/2<=360)System.out.print('y');
else System.out.print('n');
System.out.println();
}
}
}