-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathNamayeshgahMajazi.java
41 lines (36 loc) · 1.19 KB
/
NamayeshgahMajazi.java
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
import java.util.Scanner;
/*
Question title = namayeshgah majazi - نمایشگاه مجازی
https://quera.ir/problemset/110015/
*/
public class NamayeshgahMajazi {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int count = Integer.parseInt(sc.nextLine().trim());
//number of booth
int num = 1;
int remainingBooth = count;
for (int i = 1; i <= 4; i++) {
System.out.println("########.......########");
switch (count) {
case 1: {
System.out.println("#ghorfe" + num + "..............#");
remainingBooth--;
break;
}
case 0: {
System.out.println("#.....................#");
break;
}
default: {
System.out.println("#ghorfe" + num + ".......ghorfe" + (1 + num) + "#");
remainingBooth -= 2;
num += 2;
break;
}
}
count = remainingBooth;
}
System.out.println("#######################");
}
}