node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
2,
2,
13,
17,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
69,
73
],
[
62,
74
],
[
76,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int keika = 60 * h + m;",
"keika",
"60 * h + m",
"60 * h",
"60",
"h",
"m",
"double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));",
"seta",
"Math.toRadians(Math.abs(keika * 0.5 - m * 6))",
"Math.toRadians",
"Math",
"Math.abs(keika * 0.5 - m * 6)",
"Math.abs",
"Math",
"keika * 0.5 - m * 6",
"keika * 0.5",
"keika",
"0.5",
"m * 6",
"m",
"6",
"System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta))",
"Math.sqrt",
"Math",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(seta)",
"b",
"2 * a * b * Math.cos(seta)",
"2",
"a",
"b",
"Math.cos(seta)",
"Math.cos",
"Math",
"seta",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n int keika = 60 * h + m;\n double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));\n System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
int keika = 60 * h + m;
double seta = Math.toRadians(Math.abs(keika * 0.5 - m * 6));
System.out.println(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(seta)));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
2,
2,
13,
17,
2,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
13,
13,
30,
0,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
13,
17,
41,
13,
2,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
19,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
30,
31
],
[
30,
32
],
[
13,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
38,
40
],
[
13,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
46,
48
],
[
13,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
13,
57
],
[
57,
58
],
[
57,
59
],
[
13,
60
],
[
60,
61
],
[
60,
62
],
[
13,
63
],
[
63,
64
],
[
63,
65
],
[
13,
66
],
[
66,
67
],
[
66,
68
],
[
13,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
69,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
13,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
97,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
111,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
120,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
131,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
128,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
140,
144
],
[
128,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
147,
150
],
[
147,
151
],
[
128,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
158,
164
],
[
128,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
13,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
171,
176
],
[
9,
177
],
[
177,
178
]
] |
[
"import java.util.*;\nimport java.io.*;\n\nclass Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }\n\n }\n}",
"Main",
"public static void main(String args[])throws IOException{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }\n\n }",
"main",
"{\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }\n\n }",
"try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }",
"{\n String[] input = br.readLine().split(\" \");\n double A = Double.parseDouble(input[0]);\n double B = Double.parseDouble(input[1]);\n double H = Double.parseDouble(input[2]);\n double M = Double.parseDouble(input[3]);\n\n double h_r = 0;\n double m_r = 0;\n double r = 0;\n double result = 0;\n\n if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }\n\n //System.out.println(h_r);\n //System.out.println(m_r);\n\n if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }\n\n System.out.println(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String[] input = br.readLine().split(\" \");",
"input",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"double A = Double.parseDouble(input[0]);",
"A",
"Double.parseDouble(input[0])",
"Double.parseDouble",
"Double",
"input[0]",
"input",
"0",
"double B = Double.parseDouble(input[1]);",
"B",
"Double.parseDouble(input[1])",
"Double.parseDouble",
"Double",
"input[1]",
"input",
"1",
"double H = Double.parseDouble(input[2]);",
"H",
"Double.parseDouble(input[2])",
"Double.parseDouble",
"Double",
"input[2]",
"input",
"2",
"double M = Double.parseDouble(input[3]);",
"M",
"Double.parseDouble(input[3])",
"Double.parseDouble",
"Double",
"input[3]",
"input",
"3",
"double h_r = 0;",
"h_r",
"0",
"double m_r = 0;",
"m_r",
"0",
"double r = 0;",
"r",
"0",
"double result = 0;",
"result",
"0",
"if(M == 0){\n m_r = 360;\n h_r = H * 30;\n }else{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }",
"M == 0",
"M",
"0",
"{\n m_r = 360;\n h_r = H * 30;\n }",
"m_r = 360",
"m_r",
"360",
"h_r = H * 30",
"h_r",
"H * 30",
"H",
"30",
"{\n m_r = M * 6;\n h_r = H * 30 + M * 0.5;\n }",
"m_r = M * 6",
"m_r",
"M * 6",
"M",
"6",
"h_r = H * 30 + M * 0.5",
"h_r",
"H * 30 + M * 0.5",
"H * 30",
"H",
"30",
"M * 0.5",
"M",
"0.5",
"if(H == 0 && M == 0){\n result = A - B;\n }else{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }",
"H == 0 && M == 0",
"H == 0",
"H",
"0",
"M == 0",
"M",
"0",
"{\n result = A - B;\n }",
"result = A - B",
"result",
"A - B",
"A",
"B",
"{\n r = Math.abs(h_r - m_r);\n if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }\n }",
"r = Math.abs(h_r - m_r)",
"r",
"Math.abs(h_r - m_r)",
"Math.abs",
"Math",
"h_r - m_r",
"h_r",
"m_r",
"if(r == 0){\n result = 0;\n }else{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }",
"r == 0",
"r",
"0",
"{\n result = 0;\n }",
"result = 0",
"result",
"0",
"{\n double cos = Math.cos(Math.toRadians(r));\n double a = Math.pow(A, 2);\n double b = Math.pow(B, 2);\n double tmp = a + b - (2 * A * B * cos);\n result = Math.sqrt(tmp);\n }",
"double cos = Math.cos(Math.toRadians(r));",
"cos",
"Math.cos(Math.toRadians(r))",
"Math.cos",
"Math",
"Math.toRadians(r)",
"Math.toRadians",
"Math",
"r",
"double a = Math.pow(A, 2);",
"a",
"Math.pow(A, 2)",
"Math.pow",
"Math",
"A",
"2",
"double b = Math.pow(B, 2);",
"b",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"double tmp = a + b - (2 * A * B * cos);",
"tmp",
"a + b - (2 * A * B * cos)",
"a + b",
"a",
"b",
"(2 * A * B * cos)",
"B",
"2 * A * B * cos",
"2",
"A",
"B",
"cos",
"result = Math.sqrt(tmp)",
"result",
"Math.sqrt(tmp)",
"Math.sqrt",
"Math",
"tmp",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String args[]",
"args"
] |
import java.util.*;
import java.io.*;
class Main{
public static void main(String args[])throws IOException{
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){
String[] input = br.readLine().split(" ");
double A = Double.parseDouble(input[0]);
double B = Double.parseDouble(input[1]);
double H = Double.parseDouble(input[2]);
double M = Double.parseDouble(input[3]);
double h_r = 0;
double m_r = 0;
double r = 0;
double result = 0;
if(M == 0){
m_r = 360;
h_r = H * 30;
}else{
m_r = M * 6;
h_r = H * 30 + M * 0.5;
}
//System.out.println(h_r);
//System.out.println(m_r);
if(H == 0 && M == 0){
result = A - B;
}else{
r = Math.abs(h_r - m_r);
if(r == 0){
result = 0;
}else{
double cos = Math.cos(Math.toRadians(r));
double a = Math.pow(A, 2);
double b = Math.pow(B, 2);
double tmp = a + b - (2 * A * B * cos);
result = Math.sqrt(tmp);
}
}
System.out.println(result);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
41,
13,
2,
13,
13,
41,
13,
2,
2,
13,
13,
2,
13,
13,
41,
13,
8,
2,
13,
13,
2,
13,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
2,
17,
13,
41,
13,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
2,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
127,
5
],
[
127,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
8,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
63,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
8,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
91,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
107,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
8,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}",
"main",
"{\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int A=scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int B=scan.nextInt();",
"B",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int H=scan.nextInt();",
"H",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int M=scan.nextInt();",
"M",
"scan.nextInt()",
"scan.nextInt",
"scan",
"double wm=360/60;",
"wm",
"360/60",
"360",
"60",
"double wh1=360/12;",
"wh1",
"360/12",
"360",
"12",
"double wh2=30.0/60.0;",
"wh2",
"30.0/60.0",
"30.0",
"60.0",
"double m_angle=(double)M*wm;",
"m_angle",
"(double)M*wm",
"(double)M",
"wm",
"double h_angle=(double)H*wh1+(double)M*wh2;",
"h_angle",
"(double)H*wh1+(double)M*wh2",
"(double)H*wh1",
"(double)H",
"wh1",
"(double)M*wh2",
"(double)M",
"wh2",
"double angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;",
"angle_a",
"m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle",
"m_angle>h_angle",
"m_angle",
"h_angle",
"m_angle-h_angle",
"m_angle",
"h_angle",
"h_angle-m_angle",
"h_angle",
"m_angle",
"if(angle_a>180)angle_a=360-angle_a;",
"angle_a>180",
"angle_a",
"180",
"angle_a=360-angle_a",
"angle_a",
"360-angle_a",
"360",
"angle_a",
"double b=Math.pow(A,2);",
"b",
"Math.pow(A,2)",
"Math.pow",
"Math",
"A",
"2",
"double c=Math.pow(B, 2);",
"c",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"double a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));",
"a",
"Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)))",
"Math.sqrt",
"Math",
"b+c-2*A*B*Math.cos(Math.toRadians(angle_a))",
"b+c",
"b",
"c",
"2*A*B*Math.cos(Math.toRadians(angle_a))",
"B",
"2*A*B*Math.cos(Math.toRadians(angle_a))",
"2",
"A",
"B",
"Math.cos(Math.toRadians(angle_a))",
"Math.cos",
"Math",
"Math.toRadians(angle_a)",
"Math.toRadians",
"Math",
"angle_a",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tint A=scan.nextInt();\n\t\tint B=scan.nextInt();\n\t\tint H=scan.nextInt();\n\t\tint M=scan.nextInt();\n\t\tdouble wm=360/60;\n\t\tdouble wh1=360/12;\n\t\tdouble wh2=30.0/60.0;\n\t\tdouble m_angle=(double)M*wm;\n\t\tdouble h_angle=(double)H*wh1+(double)M*wh2;\n\t\tdouble angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;\n\t\tif(angle_a>180)angle_a=360-angle_a;\n\t\tdouble b=Math.pow(A,2);\n\t\tdouble c=Math.pow(B, 2);\n\t\t\n\t\tdouble a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));\n\t\tSystem.out.println(a);\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan=new Scanner(System.in);
int A=scan.nextInt();
int B=scan.nextInt();
int H=scan.nextInt();
int M=scan.nextInt();
double wm=360/60;
double wh1=360/12;
double wh2=30.0/60.0;
double m_angle=(double)M*wm;
double h_angle=(double)H*wh1+(double)M*wh2;
double angle_a=m_angle>h_angle ? m_angle-h_angle : h_angle-m_angle;
if(angle_a>180)angle_a=360-angle_a;
double b=Math.pow(A,2);
double c=Math.pow(B, 2);
double a=Math.sqrt(b+c-2*A*B*Math.cos(Math.toRadians(angle_a)));
System.out.println(a);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
41,
13,
2,
2,
17,
17,
2,
2,
13,
17,
13,
41,
13,
2,
2,
17,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
13,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
214,
5
],
[
214,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
58,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
74,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
87,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
115,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
115,
119
],
[
6,
120
],
[
120,
121
],
[
214,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
130,
131
],
[
122,
132
],
[
132,
133
],
[
214,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
141,
142
],
[
142,
143
],
[
134,
144
],
[
144,
145
],
[
214,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
146,
153
],
[
153,
154
],
[
214,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
161,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
157,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
174,
177
],
[
157,
178
],
[
178,
179
],
[
178,
180
],
[
181,
182
],
[
181,
183
],
[
157,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
184,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
191,
193
],
[
184,
194
],
[
194,
195
],
[
195,
196
],
[
184,
197
],
[
198,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
199,
203
],
[
203,
204
],
[
204,
205
],
[
203,
206
],
[
206,
207
],
[
206,
208
],
[
157,
209
],
[
209,
210
],
[
155,
211
],
[
211,
212
],
[
0,
213
],
[
213,
214
],
[
213,
215
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をlongで返却\n\t *\n\t * @return\n\t */\n\tpublic static long getLong(Scanner sc) {\n\n\t\treturn Long.parseLong(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をintで返却\n\t *\n\t * @return\n\t */\n\tpublic static int getInt(Scanner sc) {\n\n\t\treturn Integer.parseInt(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をStringで返却\n\t *\n\t * @return\n\t */\n\tpublic static String getString(Scanner sc) {\n\n\t\treturn sc.next();\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をint配列で返却\n\t *\n\t * @return\n\t */\n\tpublic static int[] getIntArray(Scanner sc) {\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をlongで返却\n\t *\n\t * @return\n\t */\n\tpublic static long getLong(Scanner sc) {\n\n\t\treturn Long.parseLong(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をintで返却\n\t *\n\t * @return\n\t */\n\tpublic static int getInt(Scanner sc) {\n\n\t\treturn Integer.parseInt(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をStringで返却\n\t *\n\t * @return\n\t */\n\tpublic static String getString(Scanner sc) {\n\n\t\treturn sc.next();\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をint配列で返却\n\t *\n\t * @return\n\t */\n\tpublic static int[] getIntArray(Scanner sc) {\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = getInt(sc);",
"a",
"getInt(sc)",
"getInt",
"sc",
"int b = getInt(sc);",
"b",
"getInt(sc)",
"getInt",
"sc",
"int h = getInt(sc);",
"h",
"getInt(sc)",
"getInt",
"sc",
"int m = getInt(sc);",
"m",
"getInt(sc)",
"getInt",
"sc",
"double angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);",
"angleA",
"(double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m)",
"(double) (360.0 / 720.0)",
"360.0",
"720.0",
"((double) h * 60.0 + (double) m)",
"(double) h * 60.0",
"(double) h",
"60.0",
"(double) m",
"double angleB = (double) (360.0 / 60.0) * (double) m;",
"angleB",
"(double) (360.0 / 60.0) * (double) m",
"(double) (360.0 / 60.0)",
"360.0",
"60.0",
"(double) m",
"double angle = Math.abs(angleA - angleB);",
"angle",
"Math.abs(angleA - angleB)",
"Math.abs",
"Math",
"angleA - angleB",
"angleA",
"angleB",
"if (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}",
"angle == 0",
"angle",
"0",
"{\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t}",
"System.out.println(Math.abs(b - a))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.abs(b - a)",
"Math.abs",
"Math",
"b - a",
"b",
"a",
"if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}",
"angle == 180",
"angle",
"180",
"{\n\t\t\tSystem.out.println((double) (a + b));\n\t\t}",
"System.out.println((double) (a + b))",
"System.out.println",
"System.out",
"System",
"System.out",
"(double) (a + b)",
"a",
"b",
"{\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}",
"double cos = Math.cos(Math.toRadians(angle));",
"cos",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"System.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(a * a + b * b - 2.0 * a * b * cos)",
"Math.sqrt",
"Math",
"a * a + b * b - 2.0 * a * b * cos",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2.0 * a * b * cos",
"b",
"2.0 * a * b * cos",
"2.0",
"a",
"b",
"cos",
"String[] args",
"args",
"/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をlongで返却\n\t *\n\t * @return\n\t */\n\tpublic static long getLong(Scanner sc) {\n\n\t\treturn Long.parseLong(sc.next());\n\t}",
"getLong",
"{\n\n\t\treturn Long.parseLong(sc.next());\n\t}",
"return Long.parseLong(sc.next());",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"Scanner sc",
"sc",
"/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をintで返却\n\t *\n\t * @return\n\t */\n\tpublic static int getInt(Scanner sc) {\n\n\t\treturn Integer.parseInt(sc.next());\n\t}",
"getInt",
"{\n\n\t\treturn Integer.parseInt(sc.next());\n\t}",
"return Integer.parseInt(sc.next());",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Scanner sc",
"sc",
"/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をStringで返却\n\t *\n\t * @return\n\t */\n\tpublic static String getString(Scanner sc) {\n\n\t\treturn sc.next();\n\t}",
"getString",
"{\n\n\t\treturn sc.next();\n\t}",
"return sc.next();",
"sc.next()",
"sc.next",
"sc",
"Scanner sc",
"sc",
"/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をint配列で返却\n\t *\n\t * @return\n\t */\n\tpublic static int[] getIntArray(Scanner sc) {\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}",
"getIntArray",
"{\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}",
"String line = \"\";",
"line",
"\"\"",
"while (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}",
"line.equals(\"\")",
"line.equals",
"line",
"\"\"",
"{\n\t\t\tline = sc.nextLine();\n\t\t}",
"line = sc.nextLine()",
"line",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String[] strArray = line.split(\" \");",
"strArray",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"int[] intArray = new int[strArray.length];",
"intArray",
"new int[strArray.length]",
"strArray.length",
"strArray",
"strArray.length",
"for (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < strArray.length",
"i",
"strArray.length",
"strArray",
"strArray.length",
"i++",
"i++",
"i",
"{\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}",
"{\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}",
"intArray[i] = Integer.parseInt(strArray[i])",
"intArray[i]",
"intArray",
"i",
"Integer.parseInt(strArray[i])",
"Integer.parseInt",
"Integer",
"strArray[i]",
"strArray",
"i",
"return intArray;",
"intArray",
"Scanner sc",
"sc",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をlongで返却\n\t *\n\t * @return\n\t */\n\tpublic static long getLong(Scanner sc) {\n\n\t\treturn Long.parseLong(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をintで返却\n\t *\n\t * @return\n\t */\n\tpublic static int getInt(Scanner sc) {\n\n\t\treturn Integer.parseInt(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をStringで返却\n\t *\n\t * @return\n\t */\n\tpublic static String getString(Scanner sc) {\n\n\t\treturn sc.next();\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をint配列で返却\n\t *\n\t * @return\n\t */\n\tpublic static int[] getIntArray(Scanner sc) {\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = getInt(sc);\n\t\tint b = getInt(sc);\n\t\tint h = getInt(sc);\n\t\tint m = getInt(sc);\n\n\t\tdouble angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);\n\n\t\tdouble angleB = (double) (360.0 / 60.0) * (double) m;\n\t\tdouble angle = Math.abs(angleA - angleB);\n\t\tif (angle == 0) {\n\t\t\tSystem.out.println(Math.abs(b - a));\n\t\t} else if (angle == 180) {\n\t\t\tSystem.out.println((double) (a + b));\n\t\t} else {\n\t\t\tdouble cos = Math.cos(Math.toRadians(angle));\n\t\t\tSystem.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));\n\t\t}\n\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をlongで返却\n\t *\n\t * @return\n\t */\n\tpublic static long getLong(Scanner sc) {\n\n\t\treturn Long.parseLong(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をintで返却\n\t *\n\t * @return\n\t */\n\tpublic static int getInt(Scanner sc) {\n\n\t\treturn Integer.parseInt(sc.next());\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をStringで返却\n\t *\n\t * @return\n\t */\n\tpublic static String getString(Scanner sc) {\n\n\t\treturn sc.next();\n\t}\n\n\t/**\n\t * *汎用メソッド <br>\n\t * スキャナーからの入力値をint配列で返却\n\t *\n\t * @return\n\t */\n\tpublic static int[] getIntArray(Scanner sc) {\n\t\tString line = \"\";\n\t\t// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策\n\t\twhile (line.equals(\"\")) {\n\t\t\tline = sc.nextLine();\n\t\t}\n\n\t\tString[] strArray = line.split(\" \");\n\t\tint[] intArray = new int[strArray.length];\n\t\tfor (int i = 0; i < strArray.length; i++) {\n\t\t\tintArray[i] = Integer.parseInt(strArray[i]);\n\t\t}\n\t\treturn intArray;\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = getInt(sc);
int b = getInt(sc);
int h = getInt(sc);
int m = getInt(sc);
double angleA = (double) (360.0 / 720.0) * ((double) h * 60.0 + (double) m);
double angleB = (double) (360.0 / 60.0) * (double) m;
double angle = Math.abs(angleA - angleB);
if (angle == 0) {
System.out.println(Math.abs(b - a));
} else if (angle == 180) {
System.out.println((double) (a + b));
} else {
double cos = Math.cos(Math.toRadians(angle));
System.out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * cos));
}
}
/**
* *汎用メソッド <br>
* スキャナーからの入力値をlongで返却
*
* @return
*/
public static long getLong(Scanner sc) {
return Long.parseLong(sc.next());
}
/**
* *汎用メソッド <br>
* スキャナーからの入力値をintで返却
*
* @return
*/
public static int getInt(Scanner sc) {
return Integer.parseInt(sc.next());
}
/**
* *汎用メソッド <br>
* スキャナーからの入力値をStringで返却
*
* @return
*/
public static String getString(Scanner sc) {
return sc.next();
}
/**
* *汎用メソッド <br>
* スキャナーからの入力値をint配列で返却
*
* @return
*/
public static int[] getIntArray(Scanner sc) {
String line = "";
// 直前にnext()を実行していると改行コードだけ取ってしまうのでその対策
while (line.equals("")) {
line = sc.nextLine();
}
String[] strArray = line.split(" ");
int[] intArray = new int[strArray.length];
for (int i = 0; i < strArray.length; i++) {
intArray[i] = Integer.parseInt(strArray[i]);
}
return intArray;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
13,
41,
13,
2,
17,
17,
41,
13,
2,
13,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
4,
18,
13,
2,
2,
17,
18,
13,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
17,
18,
13,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
17,
18,
13,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
17,
18,
13,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
13,
13,
2,
13,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
142,
5
],
[
142,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
62,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
76,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
90,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
104,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
8,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
8,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
8,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
122,
132
],
[
8,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
133,
138
],
[
6,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] |
[
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int m2 = h * 60 + m;",
"m2",
"h * 60 + m",
"h * 60",
"h",
"60",
"m",
"int rev = 12 * 60;",
"rev",
"12 * 60",
"12",
"60",
"double hrot = (double)(m2)/rev;",
"hrot",
"(double)(m2)/rev",
"(double)(m2)",
"rev",
"double mrot = (double)(m)/60;",
"mrot",
"(double)(m)/60",
"(double)(m)",
"60",
"double hx = a * Math.sin(2 * Math.PI * hrot);",
"hx",
"a * Math.sin(2 * Math.PI * hrot)",
"a",
"Math.sin(2 * Math.PI * hrot)",
"Math.sin",
"Math",
"2 * Math.PI * hrot",
"2 * Math.PI * hrot",
"2",
"Math.PI",
"Math",
"Math.PI",
"hrot",
"double hy = a * Math.cos(2 * Math.PI * hrot);",
"hy",
"a * Math.cos(2 * Math.PI * hrot)",
"a",
"Math.cos(2 * Math.PI * hrot)",
"Math.cos",
"Math",
"2 * Math.PI * hrot",
"2 * Math.PI * hrot",
"2",
"Math.PI",
"Math",
"Math.PI",
"hrot",
"double mx = b * Math.sin(2 * Math.PI * mrot);",
"mx",
"b * Math.sin(2 * Math.PI * mrot)",
"b",
"Math.sin(2 * Math.PI * mrot)",
"Math.sin",
"Math",
"2 * Math.PI * mrot",
"2 * Math.PI * mrot",
"2",
"Math.PI",
"Math",
"Math.PI",
"mrot",
"double my = b * Math.cos(2 * Math.PI * mrot);",
"my",
"b * Math.cos(2 * Math.PI * mrot)",
"b",
"Math.cos(2 * Math.PI * mrot)",
"Math.cos",
"Math",
"2 * Math.PI * mrot",
"2 * Math.PI * mrot",
"2",
"Math.PI",
"Math",
"Math.PI",
"mrot",
"double dx = hx - mx;",
"dx",
"hx - mx",
"hx",
"mx",
"double dy = hy - my;",
"dy",
"hy - my",
"hy",
"my",
"double dist = Math.pow(dx * dx + dy * dy, 0.5);",
"dist",
"Math.pow(dx * dx + dy * dy, 0.5)",
"Math.pow",
"Math",
"dx * dx + dy * dy",
"dx * dx",
"dx",
"dx",
"dy * dy",
"dy",
"dy",
"0.5",
"System.out.println(dist)",
"System.out.println",
"System.out",
"System",
"System.out",
"dist",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint a = scan.nextInt();\n\t\tint b = scan.nextInt();\n\t\tint h = scan.nextInt();\n\t\tint m = scan.nextInt();\n\n\t\tint m2 = h * 60 + m;\n\t\tint rev = 12 * 60;\n\t\tdouble hrot = (double)(m2)/rev;\n\t\tdouble mrot = (double)(m)/60;\n\n\t\tdouble hx = a * Math.sin(2 * Math.PI * hrot);\n\t\tdouble hy = a * Math.cos(2 * Math.PI * hrot);\n\t\tdouble mx = b * Math.sin(2 * Math.PI * mrot);\n\t\tdouble my = b * Math.cos(2 * Math.PI * mrot);\n\t\tdouble dx = hx - mx;\n\t\tdouble dy = hy - my;\n\n\t\tdouble dist = Math.pow(dx * dx + dy * dy, 0.5);\n\n\t\tSystem.out.println(dist);\n\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int h = scan.nextInt();
int m = scan.nextInt();
int m2 = h * 60 + m;
int rev = 12 * 60;
double hrot = (double)(m2)/rev;
double mrot = (double)(m)/60;
double hx = a * Math.sin(2 * Math.PI * hrot);
double hy = a * Math.cos(2 * Math.PI * hrot);
double mx = b * Math.sin(2 * Math.PI * mrot);
double my = b * Math.cos(2 * Math.PI * mrot);
double dx = hx - mx;
double dy = hy - my;
double dist = Math.pow(dx * dx + dy * dy, 0.5);
System.out.println(dist);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
18,
13,
13,
17,
41,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
41,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
35,
45
],
[
45,
46
],
[
45,
47
],
[
35,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
52,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
56,
58
],
[
52,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
72,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
88,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;",
"theta1",
"(h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2",
"(h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2",
"(h / 12.0 + m / 60.0 / 12.0)",
"h / 12.0",
"h",
"12.0",
"m / 60.0 / 12.0",
"m / 60.0 / 12.0",
"m",
"60.0",
"12.0",
"Math.PI",
"Math",
"Math.PI",
"2",
"double theta2 = m / 60.0 * Math.PI * 2;",
"theta2",
"m / 60.0 * Math.PI * 2",
"m / 60.0 * Math.PI * 2",
"m / 60.0",
"m",
"60.0",
"Math.PI",
"Math",
"Math.PI",
"2",
"double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);",
"ret",
"a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2)",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2 * a * b * Math.cos(theta1 - theta2)",
"b",
"2 * a * b * Math.cos(theta1 - theta2)",
"2",
"a",
"b",
"Math.cos(theta1 - theta2)",
"Math.cos",
"Math",
"theta1 - theta2",
"theta1",
"theta2",
"ret = Math.sqrt(ret)",
"ret",
"Math.sqrt(ret)",
"Math.sqrt",
"Math",
"ret",
"System.out.printf(\"%.12f\\n\", ret)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.12f\\n\"",
"ret",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;\n double theta2 = m / 60.0 * Math.PI * 2;\n\n double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);\n ret = Math.sqrt(ret);\n\n System.out.printf(\"%.12f\\n\", ret);\n\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextInt();
double b = sc.nextInt();
double h = sc.nextInt();
double m = sc.nextInt();
double theta1 = (h / 12.0 + m / 60.0 / 12.0) * Math.PI * 2;
double theta2 = m / 60.0 * Math.PI * 2;
double ret = a * a + b * b - 2 * a * b * Math.cos(theta1 - theta2);
ret = Math.sqrt(ret);
System.out.printf("%.12f\n", ret);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
2,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
2,
13,
17,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
8,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
91,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }",
"main",
"{\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int H = scanner.nextInt();",
"H",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int M = scanner.nextInt();",
"M",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"double S = 30*H+0.5*M;",
"S",
"30*H+0.5*M",
"30*H",
"30",
"H",
"0.5*M",
"0.5",
"M",
"double L = 6*M;",
"L",
"6*M",
"6",
"M",
"double angle = Math.abs(L-S);",
"angle",
"Math.abs(L-S)",
"Math.abs",
"Math",
"L-S",
"L",
"S",
"if(angle>180){\n angle = Math.abs(angle-360);\n }",
"angle>180",
"angle",
"180",
"{\n angle = Math.abs(angle-360);\n }",
"angle = Math.abs(angle-360)",
"angle",
"Math.abs(angle-360)",
"Math.abs",
"Math",
"angle-360",
"angle",
"360",
"angle = Math.toRadians(angle)",
"angle",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle))",
"Math.sqrt",
"Math",
"A*A+B*B-2*A*B*Math.cos(angle)",
"A*A+B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*A*B*Math.cos(angle)",
"B",
"2*A*B*Math.cos(angle)",
"2",
"A",
"B",
"Math.cos(angle)",
"Math.cos",
"Math",
"angle",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n \n Scanner scanner = new Scanner(System.in);\n \n int A = scanner.nextInt();\n int B = scanner.nextInt();\n int H = scanner.nextInt();\n int M = scanner.nextInt();\n \n //短針\n double S = 30*H+0.5*M; \n //長針\n double L = 6*M;\n \n double angle = Math.abs(L-S);\n \n if(angle>180){\n angle = Math.abs(angle-360);\n }\n \n angle = Math.toRadians(angle);\n \n System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));\n \n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int A = scanner.nextInt();
int B = scanner.nextInt();
int H = scanner.nextInt();
int M = scanner.nextInt();
//短針
double S = 30*H+0.5*M;
//長針
double L = 6*M;
double angle = Math.abs(L-S);
if(angle>180){
angle = Math.abs(angle-360);
}
angle = Math.toRadians(angle);
System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(angle)));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
18,
13,
13,
17,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
35,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
40,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
6,
79
],
[
79,
80
]
] |
[
"import java.util.Scanner;\n\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int D = sc.nextInt();\n \n double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);\n \n \n System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))));\n \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int D = sc.nextInt();\n \n double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);\n \n \n System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))));\n \n }\n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int D = sc.nextInt();\n \n double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);\n \n \n System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))));\n \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int C = sc.nextInt();\n int D = sc.nextInt();\n \n double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);\n \n \n System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))));\n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int C = sc.nextInt();",
"C",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int D = sc.nextInt();",
"D",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);",
"radian",
"Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0)",
"Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0)",
"Math.PI",
"Math",
"Math.PI",
"2",
"(C/12.0 + (D/60.0)/12.0 - D / 60.0)",
"C/12.0 + (D/60.0)/12.0",
"C/12.0",
"C",
"12.0",
"(D/60.0)/12.0",
"(D/60.0)",
"D",
"60.0",
"12.0",
"D / 60.0",
"D",
"60.0",
"System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian))))",
"Math.sqrt",
"Math",
"(double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))",
"(A*A)+(B*B)",
"(A*A)",
"A",
"A",
"(B*B)",
"B",
"B",
"(2*A*B*Math.cos(radian))",
"B",
"2*A*B*Math.cos(radian)",
"2",
"A",
"B",
"Math.cos(radian)",
"Math.cos",
"Math",
"radian",
"String args[]",
"args"
] |
import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int C = sc.nextInt();
int D = sc.nextInt();
double radian = Math.PI*2*(C/12.0 + (D/60.0)/12.0 - D / 60.0);
System.out.println(Math.sqrt((double)((A*A)+(B*B)-(2*A*B*Math.cos(radian)))));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
13,
17,
13,
17,
41,
13,
2,
13,
17,
41,
13,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
8,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
8,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
85,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
85,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}",
"main",
"{\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}",
"Scanner scr =new Scanner(System.in);",
"scr",
"new Scanner(System.in)",
"int A = scr.nextInt();",
"A",
"scr.nextInt()",
"scr.nextInt",
"scr",
"int B = scr.nextInt();",
"B",
"scr.nextInt()",
"scr.nextInt",
"scr",
"int H = scr.nextInt();",
"H",
"scr.nextInt()",
"scr.nextInt",
"scr",
"int M = scr.nextInt();",
"M",
"scr.nextInt()",
"scr.nextInt",
"scr",
"double H1 = (H*60+M)*0.5;",
"H1",
"(H*60+M)*0.5",
"(H*60+M)",
"H*60",
"H",
"60",
"M",
"0.5",
"double M1 = M*6;",
"M1",
"M*6",
"M",
"6",
"double KK;",
"KK",
"if(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}",
"H1 < M1",
"H1",
"M1",
"{\n\t\t\tKK = M1-H1;\n\t\t}",
"KK = M1-H1",
"KK",
"M1-H1",
"M1",
"H1",
"{\n\t\t\tKK = H1-M1;\n\t\t}",
"KK = H1-M1",
"KK",
"H1-M1",
"H1",
"M1",
"double Theta = Math.cos(Math.toRadians(KK));",
"Theta",
"Math.cos(Math.toRadians(KK))",
"Math.cos",
"Math",
"Math.toRadians(KK)",
"Math.toRadians",
"Math",
"KK",
"double ans = A*A+B*B-2*B*A*Theta;",
"ans",
"A*A+B*B-2*B*A*Theta",
"A*A+B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*B*A*Theta",
"A",
"2*B*A*Theta",
"2",
"B",
"A",
"Theta",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scr =new Scanner(System.in);\n\t\t\n\t\tint A = scr.nextInt();\n\t\tint B = scr.nextInt();\n\t\tint H = scr.nextInt();\n\t\tint M = scr.nextInt();\n\t\t\n\t\tdouble H1 = (H*60+M)*0.5;\n\t\tdouble M1 = M*6;\n\t\t\n\t\tdouble KK;\n\t\t\n\t\tif(H1 < M1) {\n\t\t\tKK = M1-H1;\n\t\t}else {\n\t\t\tKK = H1-M1;\n\t\t}\n\t\t\n\t\tdouble Theta = Math.cos(Math.toRadians(KK));\n\t\t\n\t\tdouble ans = A*A+B*B-2*B*A*Theta;\n\t\t\n\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scr =new Scanner(System.in);
int A = scr.nextInt();
int B = scr.nextInt();
int H = scr.nextInt();
int M = scr.nextInt();
double H1 = (H*60+M)*0.5;
double M1 = M*6;
double KK;
if(H1 < M1) {
KK = M1-H1;
}else {
KK = H1-M1;
}
double Theta = Math.cos(Math.toRadians(KK));
double ans = A*A+B*B-2*B*A*Theta;
System.out.println(Math.sqrt(ans));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
2,
2,
2,
13,
17,
13,
17,
17,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
2,
2,
2,
13,
17,
13,
17,
17,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
13,
17,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
2,
13,
17,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
128,
5
],
[
128,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
43,
50
],
[
41,
51
],
[
51,
52
],
[
51,
53
],
[
10,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
63,
70
],
[
61,
71
],
[
71,
72
],
[
71,
73
],
[
10,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
10,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
10,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
122,
124
],
[
6,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}",
"try (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}",
"{\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}",
"Scanner scanner = new Scanner(System.in)",
"Scanner scanner = new Scanner(System.in)",
"new Scanner(System.in)",
"int a = scanner.nextInt()",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"b = scanner.nextInt();",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int h = scanner.nextInt()",
"h",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"m = scanner.nextInt();",
"m",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"double x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);",
"x1",
"a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI)",
"a",
"Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI)",
"Math.sin",
"Math",
"(h * 60.0d + m) / 12.0d / 30.0d * Math.PI",
"(h * 60.0d + m) / 12.0d / 30.0d",
"(h * 60.0d + m) / 12.0d / 30.0d",
"(h * 60.0d + m)",
"h * 60.0d",
"h",
"60.0d",
"m",
"12.0d",
"30.0d",
"Math.PI",
"Math",
"Math.PI",
"double y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);",
"y1",
"a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI)",
"a",
"Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI)",
"Math.cos",
"Math",
"(h * 60.0d + m) / 12.0d / 30.0d * Math.PI",
"(h * 60.0d + m) / 12.0d / 30.0d",
"(h * 60.0d + m) / 12.0d / 30.0d",
"(h * 60.0d + m)",
"h * 60.0d",
"h",
"60.0d",
"m",
"12.0d",
"30.0d",
"Math.PI",
"Math",
"Math.PI",
"double x2 = b * Math.sin(m / 30.d * Math.PI);",
"x2",
"b * Math.sin(m / 30.d * Math.PI)",
"b",
"Math.sin(m / 30.d * Math.PI)",
"Math.sin",
"Math",
"m / 30.d * Math.PI",
"m / 30.d",
"m",
"30.d",
"Math.PI",
"Math",
"Math.PI",
"double y2 = b * Math.cos(m / 30.d * Math.PI);",
"y2",
"b * Math.cos(m / 30.d * Math.PI)",
"b",
"Math.cos(m / 30.d * Math.PI)",
"Math.cos",
"Math",
"m / 30.d * Math.PI",
"m / 30.d",
"m",
"30.d",
"Math.PI",
"Math",
"Math.PI",
"System.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))",
"Math.sqrt",
"Math",
"(x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)",
"(x1 - x2) * (x1 - x2)",
"(x1 - x2)",
"x1",
"x2",
"(x1 - x2)",
"x1",
"x2",
"(y1 - y2) * (y1 - y2)",
"(y1 - y2)",
"y1",
"y2",
"(y1 - y2)",
"y1",
"y2",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner scanner = new Scanner(System.in)) {\n\t\t\tint a = scanner.nextInt(), b = scanner.nextInt();\n\t\t\tint h = scanner.nextInt(), m = scanner.nextInt();\n\t\t\tdouble x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);\n\t\t\tdouble x2 = b * Math.sin(m / 30.d * Math.PI);\n\t\t\tdouble y2 = b * Math.cos(m / 30.d * Math.PI);\n\t\t\tSystem.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scanner = new Scanner(System.in)) {
int a = scanner.nextInt(), b = scanner.nextInt();
int h = scanner.nextInt(), m = scanner.nextInt();
double x1 = a * Math.sin((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);
double y1 = a * Math.cos((h * 60.0d + m) / 12.0d / 30.0d * Math.PI);
double x2 = b * Math.sin(m / 30.d * Math.PI);
double y2 = b * Math.cos(m / 30.d * Math.PI);
System.out.println(Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
41,
13,
2,
17,
13,
41,
13,
2,
2,
18,
13,
13,
17,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
2,
13,
17,
41,
13,
4,
18,
13,
13,
41,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
45,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
50,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
73,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
71,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H_degree = 30*H;",
"H_degree",
"30*H",
"30",
"H",
"int M_degree = 6*M;",
"M_degree",
"6*M",
"6",
"M",
"double radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);",
"radian",
"Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0)",
"Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0)",
"Math.PI",
"Math",
"Math.PI",
"2",
"(H / 12.0 + (M / 60.0)/12.0 - M / 60.0)",
"H / 12.0 + (M / 60.0)/12.0",
"H / 12.0",
"H",
"12.0",
"(M / 60.0)/12.0",
"(M / 60.0)",
"M",
"60.0",
"12.0",
"M / 60.0",
"M",
"60.0",
"double cos = Math.cos(radian);",
"cos",
"Math.cos(radian)",
"Math.cos",
"Math",
"radian",
"double ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);",
"ans",
"Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos)",
"Math.pow(A, 2) + Math.pow(B, 2)",
"Math.pow(A, 2)",
"Math.pow",
"Math",
"A",
"2",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"(2 * A * B * cos)",
"B",
"2 * A * B * cos",
"2",
"A",
"B",
"cos",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\t\tint H_degree = 30*H;\n\t\tint M_degree = 6*M;\n\t\tdouble radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);\n\t\tdouble cos = Math.cos(radian);\n\t\tdouble ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
int H_degree = 30*H;
int M_degree = 6*M;
double radian = Math.PI * 2 * (H / 12.0 + (M / 60.0)/12.0 - M / 60.0);
double cos = Math.cos(radian);
double ans = Math.pow(A, 2) + Math.pow(B, 2) -(2 * A * B * cos);
System.out.println(Math.sqrt(ans));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
2,
17,
13,
41,
13,
2,
17,
13,
41,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
0,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
90,
94
],
[
83,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
108,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"double a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"double b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int h = scan.nextInt();",
"h",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int m = scan.nextInt();",
"m",
"scan.nextInt()",
"scan.nextInt",
"scan",
"double a_w = (30 * h) + (0.5 * m);",
"a_w",
"(30 * h) + (0.5 * m)",
"(30 * h)",
"30",
"h",
"(0.5 * m)",
"0.5",
"m",
"double b_w = 6 * m;",
"b_w",
"6 * m",
"6",
"m",
"double w = 0;",
"w",
"0",
"double ans = 0;",
"ans",
"0",
"if(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}",
"a_w >= b_w",
"a_w",
"b_w",
"{\n\t\t\tw = a_w - b_w;\n\t\t}",
"w = a_w - b_w",
"w",
"a_w - b_w",
"a_w",
"b_w",
"{\n\t\t\tw = b_w - a_w;\n\t\t}",
"w = b_w - a_w",
"w",
"b_w - a_w",
"b_w",
"a_w",
"if(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}",
"w > 180",
"w",
"180",
"{\n\t\t\tw = 360 - w;\n\t\t}",
"w = 360 - w",
"w",
"360 - w",
"360",
"w",
"ans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))))",
"ans",
"Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))))",
"Math.sqrt",
"Math",
"Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w)))",
"Math.pow(a , 2) + Math.pow(b , 2)",
"Math.pow(a , 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b , 2)",
"Math.pow",
"Math",
"b",
"2",
"(2 * a * b * Math.cos(Math.toRadians(w)))",
"b",
"2 * a * b * Math.cos(Math.toRadians(w))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(w))",
"Math.cos",
"Math",
"Math.toRadians(w)",
"Math.toRadians",
"Math",
"w",
"System.out.printf(\"%.20f\" , ans)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tdouble a = scan.nextInt();//短針の長さ\n\t\tdouble b = scan.nextInt();//長針の長さ\n\t\tint h = scan.nextInt();//時間\n\t\tint m = scan.nextInt();//分\n\t\tdouble a_w = (30 * h) + (0.5 * m);//短針の角度\n\t\tdouble b_w = 6 * m;//長針の角度\n\t\tdouble w = 0;\n\t\tdouble ans = 0;\n\n\t\tif(a_w >= b_w) {\n\t\t\tw = a_w - b_w;\n\t\t}else {\n\t\t\tw = b_w - a_w;\n\t\t}\n\n\t\tif(w > 180) {\n\t\t\tw = 360 - w;\n\t\t}\n\n\t\tans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));\n\n\t\tSystem.out.printf(\"%.20f\" , ans);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double a = scan.nextInt();//短針の長さ
double b = scan.nextInt();//長針の長さ
int h = scan.nextInt();//時間
int m = scan.nextInt();//分
double a_w = (30 * h) + (0.5 * m);//短針の角度
double b_w = 6 * m;//長針の角度
double w = 0;
double ans = 0;
if(a_w >= b_w) {
w = a_w - b_w;
}else {
w = b_w - a_w;
}
if(w > 180) {
w = 360 - w;
}
ans = Math.sqrt(Math.pow(a , 2) + Math.pow(b , 2) - (2 * a * b * Math.cos(Math.toRadians(w))));
System.out.printf("%.20f" , ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
17,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
138,
17
],
[
138,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
138,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
55,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
55,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
86,
87
],
[
55,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
55,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
55,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
115,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
115,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
55,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
126,
130
],
[
53,
131
],
[
131,
132
],
[
53,
133
],
[
133,
134
],
[
53,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"C solver = new C();",
"solver",
"new C()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class C {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }\n\n }",
"C",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }",
"solve",
"{\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }",
"int a = Integer.parseInt(in.next());",
"a",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"int b = Integer.parseInt(in.next());",
"b",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"int h = Integer.parseInt(in.next());",
"h",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"int m = Integer.parseInt(in.next());",
"m",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"double min = h * 60.0 + m;",
"min",
"h * 60.0 + m",
"h * 60.0",
"h",
"60.0",
"m",
"double rect = 5.5 * min;",
"rect",
"5.5 * min",
"5.5",
"min",
"double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));",
"ans",
"Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)))",
"Math.sqrt",
"Math",
"((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect))",
"((double) a * (double) a) + ((double) b * (double) b)",
"((double) a * (double) a)",
"(double) a",
"(double) a",
"((double) b * (double) b)",
"(double) b",
"(double) b",
"2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect))",
"(double) b",
"2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect))",
"2.0",
"(double) a",
"(double) b",
"Math.cos(Math.toRadians(rect))",
"Math.cos",
"Math",
"Math.toRadians(rect)",
"Math.toRadians",
"Math",
"rect",
"out.printf(\"%.13f\\n\", ans)",
"out.printf",
"out",
"\"%.13f\\n\"",
"ans",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n C solver = new C();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class C {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int a = Integer.parseInt(in.next());\n int b = Integer.parseInt(in.next());\n int h = Integer.parseInt(in.next());\n int m = Integer.parseInt(in.next());\n\n double min = h * 60.0 + m;\n double rect = 5.5 * min;\n double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));\n out.printf(\"%.13f\\n\", ans);\n\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
C solver = new C();
solver.solve(1, in, out);
out.close();
}
static class C {
public void solve(int testNumber, Scanner in, PrintWriter out) {
// 入力
int a = Integer.parseInt(in.next());
int b = Integer.parseInt(in.next());
int h = Integer.parseInt(in.next());
int m = Integer.parseInt(in.next());
double min = h * 60.0 + m;
double rect = 5.5 * min;
double ans = Math.sqrt(((double) a * (double) a) + ((double) b * (double) b) - 2.0 * (double) a * (double) b * Math.cos(Math.toRadians(rect)));
out.printf("%.13f\n", ans);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
2,
13,
17,
41,
13,
2,
2,
13,
17,
2,
13,
17,
4,
18,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
81,
85
],
[
74,
86
],
[
88,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
88,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double C = 0;",
"C",
"0",
"double m = M*6;",
"m",
"M*6",
"M",
"6",
"double h = H*30 + m/12;",
"h",
"H*30 + m/12",
"H*30",
"H",
"30",
"m/12",
"m",
"12",
"sc.close()",
"sc.close",
"sc",
"double k = Math.abs(h-m);",
"k",
"Math.abs(h-m)",
"Math.abs",
"Math",
"h-m",
"h",
"m",
"double K = Math.cos(Math.toRadians(k));",
"K",
"Math.cos(Math.toRadians(k))",
"Math.cos",
"Math",
"Math.toRadians(k)",
"Math.toRadians",
"Math",
"k",
"C = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K)",
"C",
"Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K)",
"Math.sqrt",
"Math",
"Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K",
"Math.pow(A, 2) + Math.pow(B, 2)",
"Math.pow(A, 2)",
"Math.pow",
"Math",
"A",
"2",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"2*A*B*K",
"B",
"2*A*B*K",
"2",
"A",
"B",
"K",
"System.out.println(C)",
"System.out.println",
"System.out",
"System",
"System.out",
"C",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tdouble C = 0;\n\t\tdouble m = M*6;\n\t\tdouble h = H*30 + m/12;\n\t\tsc.close();\n\n\t\tdouble k = Math.abs(h-m);\n\n\t\tdouble K = Math.cos(Math.toRadians(k));\n\n\t\tC = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);\n\n\t\tSystem.out.println(C);\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double C = 0;
double m = M*6;
double h = H*30 + m/12;
sc.close();
double k = Math.abs(h-m);
double K = Math.cos(Math.toRadians(k));
C = Math.sqrt(Math.pow(A, 2) + Math.pow(B, 2) - 2*A*B*K);
System.out.println(C);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
13,
17,
0,
13,
2,
2,
13,
17,
17,
41,
13,
2,
13,
17,
41,
13,
2,
2,
18,
13,
13,
17,
2,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
43,
43
],
[
43,
44
],
[
43,
45
],
[
43,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}\n}",
"Main",
"public static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"double h = (double)H / 12.0;",
"h",
"(double)H / 12.0",
"(double)H",
"12.0",
"h += (double)M / 60.0 / 12.0",
"h",
"(double)M / 60.0 / 12.0",
"(double)M / 60.0 / 12.0",
"(double)M",
"60.0",
"12.0",
"double m = (double)M / 60.0;",
"m",
"(double)M / 60.0",
"(double)M",
"60.0",
"double rad = Math.PI * 2 * (h - m);",
"rad",
"Math.PI * 2 * (h - m)",
"Math.PI * 2 * (h - m)",
"Math.PI",
"Math",
"Math.PI",
"2",
"(h - m)",
"h",
"m",
"double rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));",
"rsq",
"(A * A) + (B * B) - (2 * A * B * Math.cos(rad))",
"(A * A) + (B * B)",
"(A * A)",
"A",
"A",
"(B * B)",
"B",
"B",
"(2 * A * B * Math.cos(rad))",
"B",
"2 * A * B * Math.cos(rad)",
"2",
"A",
"B",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.println(Math.sqrt(rsq))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(rsq)",
"Math.sqrt",
"Math",
"rsq",
"final String[] args",
"args",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}\n}",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\t\tsc.close();\n\t\t// 1周のうちH時間でどれくらい進んだか \n\t\tdouble h = (double)H / 12.0;\n\t\th += (double)M / 60.0 / 12.0; // 分針\n\t\t// 1周のうちM分でどれくらい進んだか\n\t\tdouble m = (double)M / 60.0;\n\t\t// 角度\n\t\tdouble rad = Math.PI * 2 * (h - m);\n\t\t// System.out.println(rad);\n\t\t// 辺の長さ\n\t\tdouble rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));\n\t\tSystem.out.println(Math.sqrt(rsq));\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
sc.close();
// 1周のうちH時間でどれくらい進んだか
double h = (double)H / 12.0;
h += (double)M / 60.0 / 12.0; // 分針
// 1周のうちM分でどれくらい進んだか
double m = (double)M / 60.0;
// 角度
double rad = Math.PI * 2 * (h - m);
// System.out.println(rad);
// 辺の長さ
double rsq = (A * A) + (B * B) - (2 * A * B * Math.cos(rad));
System.out.println(Math.sqrt(rsq));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
17,
2,
2,
13,
17,
13,
2,
17,
17,
41,
13,
4,
18,
13,
2,
2,
17,
13,
17,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
39,
47
],
[
47,
48
],
[
47,
49
],
[
10,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
10,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
10,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
10,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
10,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
10,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
10,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
10,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
10,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
6,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }",
"main",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }",
"{\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));",
"thetaH",
"Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0))",
"Math.toRadians",
"Math",
"360.0 * (H * 60 + M) / (12.0 * 60.0)",
"360.0 * (H * 60 + M)",
"360.0",
"(H * 60 + M)",
"H * 60",
"H",
"60",
"M",
"(12.0 * 60.0)",
"12.0",
"60.0",
"double thetaM = Math.toRadians(360.0 * M / 60.0);",
"thetaM",
"Math.toRadians(360.0 * M / 60.0)",
"Math.toRadians",
"Math",
"360.0 * M / 60.0",
"360.0 * M",
"360.0",
"M",
"60.0",
"double xH = A * Math.cos(thetaH);",
"xH",
"A * Math.cos(thetaH)",
"A",
"Math.cos(thetaH)",
"Math.cos",
"Math",
"thetaH",
"double yH = A * Math.sin(thetaH);",
"yH",
"A * Math.sin(thetaH)",
"A",
"Math.sin(thetaH)",
"Math.sin",
"Math",
"thetaH",
"double xM = B * Math.cos(thetaM);",
"xM",
"B * Math.cos(thetaM)",
"B",
"Math.cos(thetaM)",
"Math.cos",
"Math",
"thetaM",
"double yM = B * Math.sin(thetaM);",
"yM",
"B * Math.sin(thetaM)",
"B",
"Math.sin(thetaM)",
"Math.sin",
"Math",
"thetaM",
"double dx = xH - xM;",
"dx",
"xH - xM",
"xH",
"xM",
"double dy = yH - yM;",
"dy",
"yH - yM",
"yH",
"yM",
"double distance = Math.sqrt(dx * dx + dy * dy);",
"distance",
"Math.sqrt(dx * dx + dy * dy)",
"Math.sqrt",
"Math",
"dx * dx + dy * dy",
"dx * dx",
"dx",
"dx",
"dy * dy",
"dy",
"dy",
"System.out.println(distance)",
"System.out.println",
"System.out",
"System",
"System.out",
"distance",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));\n double thetaM = Math.toRadians(360.0 * M / 60.0);\n\n double xH = A * Math.cos(thetaH);\n double yH = A * Math.sin(thetaH);\n double xM = B * Math.cos(thetaM);\n double yM = B * Math.sin(thetaM);\n\n double dx = xH - xM;\n double dy = yH - yM;\n\n double distance = Math.sqrt(dx * dx + dy * dy);\n\n System.out.println(distance);\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double thetaH = Math.toRadians(360.0 * (H * 60 + M) / (12.0 * 60.0));
double thetaM = Math.toRadians(360.0 * M / 60.0);
double xH = A * Math.cos(thetaH);
double yH = A * Math.sin(thetaH);
double xM = B * Math.cos(thetaM);
double yM = B * Math.sin(thetaM);
double dx = xH - xM;
double dy = yH - yM;
double distance = Math.sqrt(dx * dx + dy * dy);
System.out.println(distance);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
2,
2,
4,
18,
13,
2,
2,
2,
13,
2,
13,
17,
17,
2,
13,
17,
17,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
49,
61
],
[
63,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
75,
83
],
[
83,
84
],
[
83,
85
],
[
71,
86
],
[
71,
87
],
[
87,
88
],
[
87,
89
],
[
8,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
6,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] |
[
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = Integer.parseInt(sc.next());",
"a",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int b = Integer.parseInt(sc.next());",
"b",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"double h = Double.parseDouble(sc.next());",
"h",
"Double.parseDouble(sc.next())",
"Double.parseDouble",
"Double",
"sc.next()",
"sc.next",
"sc",
"double m = Double.parseDouble(sc.next());",
"m",
"Double.parseDouble(sc.next())",
"Double.parseDouble",
"Double",
"sc.next()",
"sc.next",
"sc",
"double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));",
"res",
"Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI))",
"Math.sqrt",
"Math",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI)",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI)",
"b",
"2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI)",
"2",
"a",
"b",
"Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI)",
"Math.cos",
"Math",
"Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI",
"Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI",
"Math.abs((h + m / 60) / 12 - m / 60)",
"Math.abs",
"Math",
"(h + m / 60) / 12 - m / 60",
"(h + m / 60) / 12",
"(h + m / 60)",
"h",
"m / 60",
"m",
"60",
"12",
"m / 60",
"m",
"60",
"2",
"Math.PI",
"Math",
"Math.PI",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }\n}",
"public class Main{\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int a = Integer.parseInt(sc.next());\n int b = Integer.parseInt(sc.next());\n double h = Double.parseDouble(sc.next());\n double m = Double.parseDouble(sc.next());\n double res = Math.sqrt(\n Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));\n System.out.println(res); \n }\n}",
"Main"
] |
import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.next());
int b = Integer.parseInt(sc.next());
double h = Double.parseDouble(sc.next());
double m = Double.parseDouble(sc.next());
double res = Math.sqrt(
Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.abs((h + m / 60) / 12 - m / 60) * 2 * Math.PI));
System.out.println(res);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
13,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
2,
2,
2,
17,
18,
13,
13,
13,
2,
17,
17,
41,
13,
2,
2,
2,
17,
18,
13,
13,
13,
17,
0,
18,
13,
17,
2,
13,
4,
18,
13,
13,
0,
18,
13,
17,
2,
13,
4,
18,
13,
13,
0,
18,
13,
17,
2,
13,
4,
18,
13,
13,
0,
18,
13,
17,
2,
13,
4,
18,
13,
13,
41,
13,
0,
13,
4,
18,
13,
2,
2,
2,
18,
13,
17,
18,
13,
17,
2,
18,
13,
17,
18,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
2,
18,
13,
17,
18,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
161,
8
],
[
161,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
11,
46
],
[
46,
47
],
[
46,
48
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
54,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
52,
60
],
[
60,
61
],
[
60,
62
],
[
11,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
67,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
65,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
11,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
11,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
11,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
11,
114
],
[
114,
115
],
[
11,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
121,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
149,
151
],
[
11,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
9,
158
],
[
158,
159
],
[
0,
160
],
[
160,
161
],
[
160,
162
]
] |
[
"import java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int hour = sc.nextInt();",
"hour",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int minute = sc.nextInt();",
"minute",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int time = hour * 60 + minute;",
"time",
"hour * 60 + minute",
"hour * 60",
"hour",
"60",
"minute",
"double[] aPosition = new double[2];",
"aPosition",
"new double[2]",
"2",
"double[] bPosition = new double[2];",
"bPosition",
"new double[2]",
"2",
"double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);",
"shortRad",
"2.0 * Math.PI * (double)time / (60.0 * 12.0)",
"2.0 * Math.PI * (double)time",
"2.0 * Math.PI * (double)time",
"2.0",
"Math.PI",
"Math",
"Math.PI",
"(double)time",
"(60.0 * 12.0)",
"60.0",
"12.0",
"double longRad = 2.0 * Math.PI * (double)time / 60.0;",
"longRad",
"2.0 * Math.PI * (double)time / 60.0",
"2.0 * Math.PI * (double)time",
"2.0 * Math.PI * (double)time",
"2.0",
"Math.PI",
"Math",
"Math.PI",
"(double)time",
"60.0",
"aPosition[0] = A * Math.sin(shortRad)",
"aPosition[0]",
"aPosition",
"0",
"A * Math.sin(shortRad)",
"A",
"Math.sin(shortRad)",
"Math.sin",
"Math",
"shortRad",
"aPosition[1] = A * Math.cos(shortRad)",
"aPosition[1]",
"aPosition",
"1",
"A * Math.cos(shortRad)",
"A",
"Math.cos(shortRad)",
"Math.cos",
"Math",
"shortRad",
"bPosition[0] = B * Math.sin(longRad)",
"bPosition[0]",
"bPosition",
"0",
"B * Math.sin(longRad)",
"B",
"Math.sin(longRad)",
"Math.sin",
"Math",
"longRad",
"bPosition[1] = B * Math.cos(longRad)",
"bPosition[1]",
"bPosition",
"1",
"B * Math.cos(longRad)",
"B",
"Math.cos(longRad)",
"Math.cos",
"Math",
"longRad",
"double distance;",
"distance",
"distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]))",
"distance",
"Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]))",
"Math.sqrt",
"Math",
"(aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1])",
"(aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0])",
"(aPosition[0] - bPosition[0])",
"aPosition[0]",
"aPosition",
"0",
"bPosition[0]",
"bPosition",
"0",
"(aPosition[0] - bPosition[0])",
"aPosition[0]",
"aPosition",
"0",
"bPosition[0]",
"bPosition",
"0",
"(aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1])",
"(aPosition[1] - bPosition[1])",
"aPosition[1]",
"aPosition",
"1",
"bPosition[1]",
"bPosition",
"1",
"(aPosition[1] - bPosition[1])",
"aPosition[1]",
"aPosition",
"1",
"bPosition[1]",
"bPosition",
"1",
"System.out.println(distance)",
"System.out.println",
"System.out",
"System",
"System.out",
"distance",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int A = sc.nextInt();\n int B = sc.nextInt();\n int hour = sc.nextInt();\n int minute = sc.nextInt();\n\n int time = hour * 60 + minute;\n\n double[] aPosition = new double[2];\n double[] bPosition = new double[2];\n\n double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);\n double longRad = 2.0 * Math.PI * (double)time / 60.0;\n\n\n aPosition[0] = A * Math.sin(shortRad);\n aPosition[1] = A * Math.cos(shortRad);\n\n bPosition[0] = B * Math.sin(longRad);\n bPosition[1] = B * Math.cos(longRad);\n\n double distance;\n distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));\n System.out.println(distance);\n }\n}",
"Main"
] |
import java.util.Scanner;
import java.lang.Math;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int hour = sc.nextInt();
int minute = sc.nextInt();
int time = hour * 60 + minute;
double[] aPosition = new double[2];
double[] bPosition = new double[2];
double shortRad = 2.0 * Math.PI * (double)time / (60.0 * 12.0);
double longRad = 2.0 * Math.PI * (double)time / 60.0;
aPosition[0] = A * Math.sin(shortRad);
aPosition[1] = A * Math.cos(shortRad);
bPosition[0] = B * Math.sin(longRad);
bPosition[1] = B * Math.cos(longRad);
double distance;
distance = Math.sqrt((aPosition[0] - bPosition[0])*(aPosition[0] - bPosition[0]) + (aPosition[1] - bPosition[1])*(aPosition[1] - bPosition[1]));
System.out.println(distance);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
2,
17,
13,
2,
17,
13,
17,
0,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
90,
11
],
[
90,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
14,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
14,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
12,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
]
] |
[
"/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic final class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public final class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int a = s.nextInt();",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"int b = s.nextInt();",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"int h = s.nextInt();",
"h",
"s.nextInt()",
"s.nextInt",
"s",
"int m = s.nextInt();",
"m",
"s.nextInt()",
"s.nextInt",
"s",
"double angle = Math.abs((double)(60*h - 11*m)/(double)2);",
"angle",
"Math.abs((double)(60*h - 11*m)/(double)2)",
"Math.abs",
"Math",
"(double)(60*h - 11*m)/(double)2",
"(double)(60*h - 11*m)",
"60*h",
"60",
"h",
"11*m",
"11",
"m",
"(double)2",
"angle = Math.toRadians(angle)",
"angle",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"double ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));",
"ans",
"Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)))",
"Math.sqrt",
"Math",
"a*a + b*b - (2*a*b*Math.cos(angle))",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"(2*a*b*Math.cos(angle))",
"b",
"2*a*b*Math.cos(angle)",
"2",
"a",
"b",
"Math.cos(angle)",
"Math.cos",
"Math",
"angle",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public final class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}\n}",
"public final class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\tScanner s = new Scanner(System.in);\n\t\tint a = s.nextInt();\n\t\tint b = s.nextInt();\n\t\tint h = s.nextInt();\n\t\tint m = s.nextInt();\n\t\tdouble angle = Math.abs((double)(60*h - 11*m)/(double)2);\n\t\tangle = Math.toRadians(angle);\n\t\t// System.out.println((2*a*b*Math.cos(angle)));\n\t\tdouble ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
] |
/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public final class Main
{
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
Scanner s = new Scanner(System.in);
int a = s.nextInt();
int b = s.nextInt();
int h = s.nextInt();
int m = s.nextInt();
double angle = Math.abs((double)(60*h - 11*m)/(double)2);
angle = Math.toRadians(angle);
// System.out.println((2*a*b*Math.cos(angle)));
double ans = Math.sqrt(a*a + b*b - (2*a*b*Math.cos(angle)));
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
2,
2,
17,
2,
13,
2,
13,
17,
2,
17,
13,
17,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
93,
8
],
[
93,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
17,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
58,
60
],
[
46,
61
],
[
45,
62
],
[
11,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
75,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
75,
79
],
[
11,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
85,
89
],
[
9,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] |
[
"import java.util.*;\nimport java.math.BigInteger;\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double pai = Math.PI;",
"pai",
"Math.PI",
"Math",
"Math.PI",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextDouble();",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m = sc.nextDouble();",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);",
"cosC",
"Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai)",
"Math.cos",
"Math",
"Math.abs(30*(h+m/60) - 6*m) / 180 * pai",
"Math.abs(30*(h+m/60) - 6*m) / 180",
"Math.abs(30*(h+m/60) - 6*m)",
"Math.abs",
"Math",
"30*(h+m/60) - 6*m",
"30*(h+m/60)",
"30",
"(h+m/60)",
"h",
"m/60",
"m",
"60",
"6*m",
"6",
"m",
"180",
"pai",
"double ansPow = b*b + a*a - 2*a*b*cosC;",
"ansPow",
"b*b + a*a - 2*a*b*cosC",
"b*b + a*a",
"b*b",
"b",
"b",
"a*a",
"a",
"a",
"2*a*b*cosC",
"b",
"2*a*b*cosC",
"2",
"a",
"b",
"cosC",
"System.out.println(Math.pow(ansPow, 0.5))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.pow(ansPow, 0.5)",
"Math.pow",
"Math",
"ansPow",
"0.5",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double pai = Math.PI;\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n // 時針は分針にも影響されることに注意\n double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);\n double ansPow = b*b + a*a - 2*a*b*cosC;\n System.out.println(Math.pow(ansPow, 0.5));\n }\n}",
"Main"
] |
import java.util.*;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double pai = Math.PI;
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
// 時針は分針にも影響されることに注意
double cosC = Math.cos(Math.abs(30*(h+m/60) - 6*m) / 180 * pai);
double ansPow = b*b + a*a - 2*a*b*cosC;
System.out.println(Math.pow(ansPow, 0.5));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
18,
13,
13,
17,
41,
13,
4,
13,
13,
2,
13,
2,
2,
13,
2,
13,
17,
17,
41,
13,
4,
13,
13,
2,
2,
13,
13,
17,
41,
13,
2,
18,
13,
13,
18,
13,
13,
41,
13,
2,
18,
13,
13,
18,
13,
13,
41,
13,
4,
18,
13,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
29,
20,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
4,
13,
13,
13,
2,
2,
18,
13,
13,
17,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
4,
18,
13,
2,
18,
13,
13,
13,
4,
13,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
2,
13,
4,
18,
13,
2,
18,
13,
13,
13,
4,
13,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
17,
17,
13,
17,
13,
17,
6,
13,
41,
13,
41,
13,
20,
2,
17,
17,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
37,
20,
30,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
42,
2,
0,
13,
4,
13,
17,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
40,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
29,
2,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
14,
2,
13,
17,
30,
0,
13,
40,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
4,
18,
13,
13,
29,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
555,
20
],
[
555,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
29,
30
],
[
29,
31
],
[
25,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
25,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
25,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
25,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
25,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
25,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
69,
75
],
[
25,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
25,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
25,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
25,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
115,
119
],
[
25,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
21,
124
],
[
124,
125
],
[
555,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
128,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
128,
145
],
[
145,
146
],
[
126,
147
],
[
147,
148
],
[
126,
149
],
[
149,
150
],
[
555,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
154,
166
],
[
166,
167
],
[
167,
168
],
[
154,
169
],
[
170,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
171,
174
],
[
171,
175
],
[
176,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
176,
181
],
[
151,
182
],
[
182,
183
],
[
555,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
186,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
190,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
197,
199
],
[
190,
200
],
[
200,
201
],
[
201,
202
],
[
190,
203
],
[
204,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
209,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
204,
217
],
[
217,
218
],
[
217,
219
],
[
217,
220
],
[
217,
221
],
[
184,
222
],
[
222,
223
],
[
555,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
230,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
237,
239
],
[
230,
240
],
[
240,
241
],
[
241,
242
],
[
230,
243
],
[
244,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
249,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
244,
257
],
[
257,
258
],
[
257,
259
],
[
257,
260
],
[
257,
261
],
[
224,
262
],
[
262,
263
],
[
555,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
269,
271
],
[
266,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
276,
278
],
[
266,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
264,
284
],
[
284,
285
],
[
264,
286
],
[
286,
287
],
[
264,
288
],
[
288,
289
],
[
555,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
295,
296
],
[
295,
297
],
[
292,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
302,
303
],
[
302,
304
],
[
292,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
290,
310
],
[
310,
311
],
[
290,
312
],
[
312,
313
],
[
290,
314
],
[
314,
315
],
[
555,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
316,
320
],
[
320,
321
],
[
316,
322
],
[
322,
323
],
[
322,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
324,
330
],
[
330,
331
],
[
331,
332
],
[
331,
333
],
[
330,
334
],
[
322,
335
],
[
335,
336
],
[
322,
337
],
[
337,
338
],
[
316,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
342,
343
],
[
347,
344
],
[
344,
345
],
[
345,
346
],
[
346,
347
],
[
347,
348
],
[
347,
349
],
[
346,
350
],
[
345,
351
],
[
344,
352
],
[
347,
353
],
[
555,
354
],
[
354,
355
],
[
354,
356
],
[
356,
357
],
[
354,
358
],
[
358,
359
],
[
358,
360
],
[
361,
362
],
[
361,
363
],
[
354,
364
],
[
364,
365
],
[
354,
366
],
[
366,
367
],
[
354,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
375
],
[
368,
376
],
[
376,
377
],
[
354,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
385,
386
],
[
381,
387
],
[
387,
388
],
[
388,
389
],
[
389,
390
],
[
389,
391
],
[
388,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
392,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
398,
401
],
[
392,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
402,
406
],
[
406,
407
],
[
407,
408
],
[
387,
409
],
[
409,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
354,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
417,
418
],
[
416,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
420,
425
],
[
416,
426
],
[
426,
427
],
[
354,
428
],
[
428,
429
],
[
428,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
430,
434
],
[
434,
435
],
[
434,
436
],
[
430,
437
],
[
437,
438
],
[
438,
439
],
[
439,
440
],
[
439,
441
],
[
441,
442
],
[
437,
443
],
[
443,
444
],
[
443,
445
],
[
437,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
449,
450
],
[
437,
451
],
[
452,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
453,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
460,
461
],
[
453,
462
],
[
462,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
466,
470
],
[
465,
471
],
[
430,
472
],
[
472,
473
],
[
473,
474
],
[
473,
475
],
[
354,
476
],
[
476,
477
],
[
476,
478
],
[
478,
479
],
[
479,
480
],
[
479,
481
],
[
478,
482
],
[
482,
483
],
[
482,
484
],
[
478,
485
],
[
485,
486
],
[
486,
487
],
[
487,
488
],
[
487,
489
],
[
489,
490
],
[
485,
491
],
[
491,
492
],
[
491,
493
],
[
485,
494
],
[
494,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
485,
499
],
[
500,
500
],
[
500,
501
],
[
501,
502
],
[
502,
503
],
[
502,
504
],
[
501,
505
],
[
505,
506
],
[
506,
507
],
[
506,
508
],
[
508,
509
],
[
501,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
513,
514
],
[
514,
515
],
[
515,
516
],
[
515,
517
],
[
514,
518
],
[
513,
519
],
[
478,
520
],
[
520,
521
],
[
521,
522
],
[
521,
523
],
[
354,
524
],
[
524,
525
],
[
524,
526
],
[
526,
527
],
[
527,
528
],
[
527,
529
],
[
526,
530
],
[
530,
531
],
[
531,
532
],
[
532,
533
],
[
532,
534
],
[
534,
535
],
[
530,
536
],
[
536,
537
],
[
536,
538
],
[
530,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
542,
543
],
[
530,
544
],
[
545,
545
],
[
545,
546
],
[
546,
547
],
[
547,
548
],
[
546,
549
],
[
526,
550
],
[
550,
551
],
[
551,
552
],
[
552,
553
],
[
0,
554
],
[
554,
555
],
[
554,
556
]
] |
[
"import java.io.BufferedInputStream;\nimport java.io.BufferedOutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Random;\n\npublic class Main {\n\n public static void main(String[] args) throws Exception {\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }\n\n private static Point point(double r, double deg) {\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }\n\n private static class Point {\n double x, y;\n\n public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n @Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }\n }\n\n private static void reverse(int[] vs) {\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }\n\n static class _Scanner {\n InputStream is;\n _Scanner(InputStream is) {\n this.is = is;\n }\n byte[] bb = new byte[1 << 15];\n int k, l;\n byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }\n\n int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }\n }\n\n private static void shuffle(int[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void shuffle(Object[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void swap(int[] ar, int i, int j) {\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n private static void swap(Object[] ar, int i, int j) {\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n\n}",
"import java.io.BufferedInputStream;",
"BufferedInputStream",
"java.io",
"import java.io.BufferedOutputStream;",
"BufferedOutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Random;",
"Random",
"java.util",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }\n\n private static Point point(double r, double deg) {\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }\n\n private static class Point {\n double x, y;\n\n public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n @Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }\n }\n\n private static void reverse(int[] vs) {\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }\n\n static class _Scanner {\n InputStream is;\n _Scanner(InputStream is) {\n this.is = is;\n }\n byte[] bb = new byte[1 << 15];\n int k, l;\n byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }\n\n int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }\n }\n\n private static void shuffle(int[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void shuffle(Object[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void swap(int[] ar, int i, int j) {\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n private static void swap(Object[] ar, int i, int j) {\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }",
"main",
"{\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }",
"try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }",
"{\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }",
"BufferedInputStream in = new BufferedInputStream(System.in)",
"BufferedInputStream in = new BufferedInputStream(System.in)",
"new BufferedInputStream(System.in)",
"PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))",
"PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))",
"new PrintWriter(new BufferedOutputStream(System.out))",
"_Scanner sc = new _Scanner(in);",
"sc",
"new _Scanner(in)",
"double a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double full = Math.PI * 2;",
"full",
"Math.PI * 2",
"Math.PI",
"Math",
"Math.PI",
"2",
"Point ap = point(a, full * ((h + m / 60.0) / 12.0));",
"ap",
"point(a, full * ((h + m / 60.0) / 12.0))",
"point",
"a",
"full * ((h + m / 60.0) / 12.0)",
"full",
"((h + m / 60.0) / 12.0)",
"(h + m / 60.0)",
"h",
"m / 60.0",
"m",
"60.0",
"12.0",
"Point bp = point(b, full * m / 60.0);",
"bp",
"point(b, full * m / 60.0)",
"point",
"b",
"full * m / 60.0",
"full * m",
"full",
"m",
"60.0",
"double dx = bp.x - ap.x;",
"dx",
"bp.x - ap.x",
"bp.x",
"bp",
"bp.x",
"ap.x",
"ap",
"ap.x",
"double dy = bp.y - ap.y;",
"dy",
"bp.y - ap.y",
"bp.y",
"bp",
"bp.y",
"ap.y",
"ap",
"ap.y",
"double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));",
"dist",
"Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2))",
"Math.sqrt",
"Math",
"Math.pow(dx, 2) + Math.pow(dy, 2)",
"Math.pow(dx, 2)",
"Math.pow",
"Math",
"dx",
"2",
"Math.pow(dy, 2)",
"Math.pow",
"Math",
"dy",
"2",
"out.println(dist)",
"out.println",
"out",
"dist",
"String[] args",
"args",
"private static Point point(double r, double deg) {\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }",
"point",
"{\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }",
"double x = r * Math.sin(deg);",
"x",
"r * Math.sin(deg)",
"r",
"Math.sin(deg)",
"Math.sin",
"Math",
"deg",
"double y = r * Math.cos(deg);",
"y",
"r * Math.cos(deg)",
"r",
"Math.cos(deg)",
"Math.cos",
"Math",
"deg",
"return new Point(x, y);",
"new Point(x, y)",
"double r",
"r",
"double deg",
"deg",
"private static void reverse(int[] vs) {\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }",
"reverse",
"{\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }",
"for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < vs.length / 2",
"i",
"vs.length / 2",
"vs.length",
"vs",
"vs.length",
"2",
"i++",
"i++",
"i",
"{\n swap(vs, i, vs.length - 1 - i);\n }",
"{\n swap(vs, i, vs.length - 1 - i);\n }",
"swap(vs, i, vs.length - 1 - i)",
"swap",
"vs",
"i",
"vs.length - 1 - i",
"vs.length - 1 - i",
"vs.length",
"vs",
"vs.length",
"1",
"i",
"int[] vs",
"vs",
"private static void shuffle(int[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }",
"shuffle",
"{\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }",
"Random rnd = new Random();",
"rnd",
"new Random()",
"for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ar.length",
"i",
"ar.length",
"ar",
"ar.length",
"i++",
"i++",
"i",
"{\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"{\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"int j = i + rnd.nextInt(ar.length - i);",
"j",
"i + rnd.nextInt(ar.length - i)",
"i",
"rnd.nextInt(ar.length - i)",
"rnd.nextInt",
"rnd",
"ar.length - i",
"ar.length",
"ar",
"ar.length",
"i",
"swap(ar, i, j)",
"swap",
"ar",
"i",
"j",
"int[] ar",
"ar",
"private static void shuffle(Object[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }",
"shuffle",
"{\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }",
"Random rnd = new Random();",
"rnd",
"new Random()",
"for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < ar.length",
"i",
"ar.length",
"ar",
"ar.length",
"i++",
"i++",
"i",
"{\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"{\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }",
"int j = i + rnd.nextInt(ar.length - i);",
"j",
"i + rnd.nextInt(ar.length - i)",
"i",
"rnd.nextInt(ar.length - i)",
"rnd.nextInt",
"rnd",
"ar.length - i",
"ar.length",
"ar",
"ar.length",
"i",
"swap(ar, i, j)",
"swap",
"ar",
"i",
"j",
"Object[] ar",
"ar",
"private static void swap(int[] ar, int i, int j) {\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }",
"swap",
"{\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }",
"int t = ar[i];",
"t",
"ar[i]",
"ar",
"i",
"ar[i] = ar[j]",
"ar[i]",
"ar",
"i",
"ar[j]",
"ar",
"j",
"ar[j] = t",
"ar[j]",
"ar",
"j",
"t",
"int[] ar",
"ar",
"int i",
"i",
"int j",
"j",
"private static void swap(Object[] ar, int i, int j) {\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }",
"swap",
"{\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }",
"Object t = ar[i];",
"t",
"ar[i]",
"ar",
"i",
"ar[i] = ar[j]",
"ar[i]",
"ar",
"i",
"ar[j]",
"ar",
"j",
"ar[j] = t",
"ar[j]",
"ar",
"j",
"t",
"Object[] ar",
"ar",
"int i",
"i",
"int j",
"j",
"private static class Point {\n double x, y;\n\n public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n @Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }\n }",
"Point",
"double x",
"x",
"y;",
"y",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"Point",
"{\n this.x = x;\n this.y = y;\n }",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"double x",
"x",
"double y",
"y",
"@Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }",
"toString",
"{\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }",
"return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';",
"\"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}'",
"y",
"\", y=\"",
"x",
"\"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}'",
"\"Point{\"",
"\"x=\"",
"x",
"\", y=\"",
"y",
"'}'",
"static class _Scanner {\n InputStream is;\n _Scanner(InputStream is) {\n this.is = is;\n }\n byte[] bb = new byte[1 << 15];\n int k, l;\n byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }\n\n int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }\n }",
"_Scanner",
"InputStream is;",
"is",
"byte[] bb = new byte[1 << 15];",
"bb",
"new byte[1 << 15]",
"1 << 15",
"1",
"15",
"int k",
"k",
"l;",
"l",
"_Scanner(InputStream is) {\n this.is = is;\n }",
"_Scanner",
"{\n this.is = is;\n }",
"this.is = is",
"this.is",
"this",
"this.is",
"is",
"InputStream is",
"is",
"byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"getc",
"{\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n }",
"if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }",
"k >= l",
"k",
"l",
"{\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }",
"k = 0",
"k",
"0",
"l = is.read(bb)",
"l",
"is.read(bb)",
"is.read",
"is",
"bb",
"if (l < 0) return -1;",
"l < 0",
"l",
"0",
"return -1;",
"-1",
"1",
"return bb[k++];",
"bb[k++]",
"bb",
"k++",
"k",
"byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }",
"skip",
"{\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }",
"byte b;",
"b",
"while ((b = getc()) <= 32)\n ;",
"(b = getc()) <= 32",
"(b = getc())",
"b",
"getc()",
"getc",
"32",
"return b;",
"b",
"int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }",
"nextInt",
"{\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }",
"int n = 0;",
"n",
"0",
"int sig = 1;",
"sig",
"1",
"for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"byte b = skip();",
"byte b = skip();",
"b",
"skip()",
"skip",
"b > 32",
"b",
"32",
"b = getc()",
"b = getc()",
"b",
"getc()",
"getc",
"{\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"{\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }",
"b == '-'",
"b",
"'-'",
"{\n sig = -1;\n }",
"sig = -1",
"sig",
"-1",
"1",
"{\n n = n * 10 + b - '0';\n }",
"n = n * 10 + b - '0'",
"n",
"n * 10 + b - '0'",
"n * 10 + b",
"n * 10",
"n",
"10",
"b",
"'0'",
"return sig * n;",
"sig * n",
"sig",
"n",
"long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }",
"nextLong",
"{\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }",
"long n = 0;",
"n",
"0",
"long sig = 1;",
"sig",
"1",
"for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"byte b = skip();",
"byte b = skip();",
"b",
"skip()",
"skip",
"b > 32",
"b",
"32",
"b = getc()",
"b = getc()",
"b",
"getc()",
"getc",
"{\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"{\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }",
"if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }",
"b == '-'",
"b",
"'-'",
"{\n sig = -1;\n }",
"sig = -1",
"sig",
"-1",
"1",
"{\n n = n * 10 + b - '0';\n }",
"n = n * 10 + b - '0'",
"n",
"n * 10 + b - '0'",
"n * 10 + b",
"n * 10",
"n",
"10",
"b",
"'0'",
"return sig * n;",
"sig * n",
"sig",
"n",
"public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }",
"next",
"{\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }",
"int b = skip();",
"int b = skip();",
"b",
"skip()",
"skip",
"b > 32",
"b",
"32",
"b = getc()",
"b = getc()",
"b",
"getc()",
"getc",
"{\n sb.append(((char) b));\n }",
"{\n sb.append(((char) b));\n }",
"sb.append(((char) b))",
"sb.append",
"sb",
"((char) b)",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }\n\n private static Point point(double r, double deg) {\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }\n\n private static class Point {\n double x, y;\n\n public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n @Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }\n }\n\n private static void reverse(int[] vs) {\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }\n\n static class _Scanner {\n InputStream is;\n _Scanner(InputStream is) {\n this.is = is;\n }\n byte[] bb = new byte[1 << 15];\n int k, l;\n byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }\n\n int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }\n }\n\n private static void shuffle(int[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void shuffle(Object[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void swap(int[] ar, int i, int j) {\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n private static void swap(Object[] ar, int i, int j) {\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n\n}",
"public class Main {\n\n public static void main(String[] args) throws Exception {\n try (BufferedInputStream in = new BufferedInputStream(System.in);\n PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n\n _Scanner sc = new _Scanner(in);\n\n double a = sc.nextInt();\n double b = sc.nextInt();\n\n double h = sc.nextInt();\n double m = sc.nextInt();\n\n double full = Math.PI * 2;\n// double full = Math.PI;\n Point ap = point(a, full * ((h + m / 60.0) / 12.0));\n Point bp = point(b, full * m / 60.0);\n\n double dx = bp.x - ap.x;\n double dy = bp.y - ap.y;\n\n double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\n\n out.println(dist);\n }\n }\n\n private static Point point(double r, double deg) {\n double x = r * Math.sin(deg);\n double y = r * Math.cos(deg);\n return new Point(x, y);\n }\n\n private static class Point {\n double x, y;\n\n public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }\n\n @Override\n public String toString() {\n return \"Point{\" +\n \"x=\" + x +\n \", y=\" + y +\n '}';\n }\n }\n\n private static void reverse(int[] vs) {\n for (int i = 0; i < vs.length / 2; i++) {\n swap(vs, i, vs.length - 1 - i);\n }\n }\n\n static class _Scanner {\n InputStream is;\n _Scanner(InputStream is) {\n this.is = is;\n }\n byte[] bb = new byte[1 << 15];\n int k, l;\n byte getc() {\n try {\n if (k >= l) {\n k = 0;\n l = is.read(bb);\n if (l < 0) return -1;\n }\n return bb[k++];\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n byte skip() {\n byte b;\n while ((b = getc()) <= 32)\n ;\n return b;\n }\n\n int nextInt() {\n int n = 0;\n int sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n long nextLong() {\n long n = 0;\n long sig = 1;\n for (byte b = skip(); b > 32; b = getc()) {\n if (b == '-') {\n sig = -1;\n } else {\n n = n * 10 + b - '0';\n }\n }\n return sig * n;\n }\n\n public String next() {\n StringBuilder sb = new StringBuilder();\n for (int b = skip(); b > 32; b = getc()) {\n sb.append(((char) b));\n }\n return sb.toString();\n }\n }\n\n private static void shuffle(int[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void shuffle(Object[] ar) {\n Random rnd = new Random();\n for (int i = 0; i < ar.length; i++) {\n int j = i + rnd.nextInt(ar.length - i);\n swap(ar, i, j);\n }\n }\n\n private static void swap(int[] ar, int i, int j) {\n int t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n private static void swap(Object[] ar, int i, int j) {\n Object t = ar[i];\n ar[i] = ar[j];\n ar[j] = t;\n }\n\n\n}",
"Main"
] |
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Random;
public class Main {
public static void main(String[] args) throws Exception {
try (BufferedInputStream in = new BufferedInputStream(System.in);
PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {
_Scanner sc = new _Scanner(in);
double a = sc.nextInt();
double b = sc.nextInt();
double h = sc.nextInt();
double m = sc.nextInt();
double full = Math.PI * 2;
// double full = Math.PI;
Point ap = point(a, full * ((h + m / 60.0) / 12.0));
Point bp = point(b, full * m / 60.0);
double dx = bp.x - ap.x;
double dy = bp.y - ap.y;
double dist = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
out.println(dist);
}
}
private static Point point(double r, double deg) {
double x = r * Math.sin(deg);
double y = r * Math.cos(deg);
return new Point(x, y);
}
private static class Point {
double x, y;
public Point(double x, double y) {
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "Point{" +
"x=" + x +
", y=" + y +
'}';
}
}
private static void reverse(int[] vs) {
for (int i = 0; i < vs.length / 2; i++) {
swap(vs, i, vs.length - 1 - i);
}
}
static class _Scanner {
InputStream is;
_Scanner(InputStream is) {
this.is = is;
}
byte[] bb = new byte[1 << 15];
int k, l;
byte getc() {
try {
if (k >= l) {
k = 0;
l = is.read(bb);
if (l < 0) return -1;
}
return bb[k++];
} catch (IOException e) {
throw new RuntimeException(e);
}
}
byte skip() {
byte b;
while ((b = getc()) <= 32)
;
return b;
}
int nextInt() {
int n = 0;
int sig = 1;
for (byte b = skip(); b > 32; b = getc()) {
if (b == '-') {
sig = -1;
} else {
n = n * 10 + b - '0';
}
}
return sig * n;
}
long nextLong() {
long n = 0;
long sig = 1;
for (byte b = skip(); b > 32; b = getc()) {
if (b == '-') {
sig = -1;
} else {
n = n * 10 + b - '0';
}
}
return sig * n;
}
public String next() {
StringBuilder sb = new StringBuilder();
for (int b = skip(); b > 32; b = getc()) {
sb.append(((char) b));
}
return sb.toString();
}
}
private static void shuffle(int[] ar) {
Random rnd = new Random();
for (int i = 0; i < ar.length; i++) {
int j = i + rnd.nextInt(ar.length - i);
swap(ar, i, j);
}
}
private static void shuffle(Object[] ar) {
Random rnd = new Random();
for (int i = 0; i < ar.length; i++) {
int j = i + rnd.nextInt(ar.length - i);
swap(ar, i, j);
}
}
private static void swap(int[] ar, int i, int j) {
int t = ar[i];
ar[i] = ar[j];
ar[j] = t;
}
private static void swap(Object[] ar, int i, int j) {
Object t = ar[i];
ar[i] = ar[j];
ar[j] = t;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
2,
2,
13,
17,
13,
17,
2,
17,
17,
41,
13,
17,
0,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
13,
2,
18,
13,
13,
17,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
101,
5
],
[
101,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
42,
48
],
[
41,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
8,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
8,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
6,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double Mangle = (m*360.0)/60.0;",
"Mangle",
"(m*360.0)/60.0",
"(m*360.0)",
"m",
"360.0",
"60.0",
"double Hangle = (h*60.0+m)*360.0/(12.0*60.0);",
"Hangle",
"(h*60.0+m)*360.0/(12.0*60.0)",
"(h*60.0+m)*360.0",
"(h*60.0+m)",
"h*60.0",
"h",
"60.0",
"m",
"360.0",
"(12.0*60.0)",
"12.0",
"60.0",
"double MHangle = 0;",
"MHangle",
"0",
"MHangle = Hangle-Mangle",
"MHangle",
"Hangle-Mangle",
"Hangle",
"Mangle",
"double cosA = Math.cos(MHangle*(Math.PI/180.0));",
"cosA",
"Math.cos(MHangle*(Math.PI/180.0))",
"Math.cos",
"Math",
"MHangle*(Math.PI/180.0)",
"MHangle",
"(Math.PI/180.0)",
"Math.PI",
"Math",
"Math.PI",
"180.0",
"double answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));",
"answer",
"Math.sqrt((a*a)+(b*b)-(2*a*b*cosA))",
"Math.sqrt",
"Math",
"(a*a)+(b*b)-(2*a*b*cosA)",
"(a*a)+(b*b)",
"(a*a)",
"a",
"a",
"(b*b)",
"b",
"b",
"(2*a*b*cosA)",
"b",
"2*a*b*cosA",
"2",
"a",
"b",
"cosA",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\t\n\t\t//0時からの分針の角度を求める\n\t\tdouble Mangle = (m*360.0)/60.0;\n\t\t//0時からの時針の角度を求める\n\t\tdouble Hangle = (h*60.0+m)*360.0/(12.0*60.0);\n\t\t\n\t\t//時針の角度-分針の角度で辺a,bの間の角度を求める\n\t\tdouble MHangle = 0;\n\t\tMHangle = Hangle-Mangle;\t\t\n\t\t\n\t\t//求めた角度からcosを求める\n\t\t//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)\n\t\tdouble cosA = Math.cos(MHangle*(Math.PI/180.0));\n\t\t\n\t\t//余弦定理から答えを求める Math.sqrt√(平方根)で求める\n\t\tdouble answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));\n\n\t\tSystem.out.println(answer);\n\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
//0時からの分針の角度を求める
double Mangle = (m*360.0)/60.0;
//0時からの時針の角度を求める
double Hangle = (h*60.0+m)*360.0/(12.0*60.0);
//時針の角度-分針の角度で辺a,bの間の角度を求める
double MHangle = 0;
MHangle = Hangle-Mangle;
//求めた角度からcosを求める
//(一度ラジアンに変換する必要があるため[角度*(Math.PI/180)]とする)
double cosA = Math.cos(MHangle*(Math.PI/180.0));
//余弦定理から答えを求める Math.sqrt√(平方根)で求める
double answer = Math.sqrt((a*a)+(b*b)-(2*a*b*cosA));
System.out.println(answer);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
2,
13,
17,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
2,
17,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
2,
13,
13,
30,
41,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
133,
5
],
[
133,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
63,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
87,
88
],
[
87,
89
],
[
78,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
100,
104
],
[
93,
105
],
[
107,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
90,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
90,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
6,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double h_kakudo = 30 * h + (double)m / 2;",
"h_kakudo",
"30 * h + (double)m / 2",
"30 * h",
"30",
"h",
"(double)m / 2",
"(double)m",
"2",
"double m_kakudo = 6 * m;",
"m_kakudo",
"6 * m",
"6",
"m",
"double kakudo_sa = Math.abs(h_kakudo - m_kakudo);",
"kakudo_sa",
"Math.abs(h_kakudo - m_kakudo)",
"Math.abs",
"Math",
"h_kakudo - m_kakudo",
"h_kakudo",
"m_kakudo",
"if(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa;",
"kakudo_sa > 180",
"kakudo_sa",
"180",
"kakudo_sa = 360 - kakudo_sa",
"kakudo_sa",
"360 - kakudo_sa",
"360",
"kakudo_sa",
"if(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}",
"kakudo_sa == 0",
"kakudo_sa",
"0",
"System.out.println(Math.abs(a - b))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.abs(a - b)",
"Math.abs",
"Math",
"a - b",
"a",
"b",
"if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}",
"kakudo_sa == 180",
"kakudo_sa",
"180",
"System.out.println(a + b)",
"System.out.println",
"System.out",
"System",
"System.out",
"a + b",
"a",
"b",
"{\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}",
"double c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));",
"c_2",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa))",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(Math.toRadians(kakudo_sa))",
"b",
"2 * a * b * Math.cos(Math.toRadians(kakudo_sa))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(kakudo_sa))",
"Math.cos",
"Math",
"Math.toRadians(kakudo_sa)",
"Math.toRadians",
"Math",
"kakudo_sa",
"double ans = Math.sqrt(c_2);",
"ans",
"Math.sqrt(c_2)",
"Math.sqrt",
"Math",
"c_2",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\tdouble h_kakudo = 30 * h + (double)m / 2;\n\t\tdouble m_kakudo = 6 * m;\n\t\t\n\t\tdouble kakudo_sa = Math.abs(h_kakudo - m_kakudo);\n\t\tif(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa; \n\t\t\n\t\tif(kakudo_sa == 0) System.out.println(Math.abs(a - b));\n\t\telse if(kakudo_sa == 180) System.out.println(a + b);\n\t\telse {\n\t\t\tdouble c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));\n\t\t\tdouble ans = Math.sqrt(c_2);\n\t\t\tSystem.out.println(ans);\n\t\t}\n\t\t\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double h_kakudo = 30 * h + (double)m / 2;
double m_kakudo = 6 * m;
double kakudo_sa = Math.abs(h_kakudo - m_kakudo);
if(kakudo_sa > 180) kakudo_sa = 360 - kakudo_sa;
if(kakudo_sa == 0) System.out.println(Math.abs(a - b));
else if(kakudo_sa == 180) System.out.println(a + b);
else {
double c_2 = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(kakudo_sa));
double ans = Math.sqrt(c_2);
System.out.println(ans);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
8,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"int h = in.nextInt();",
"h",
"in.nextInt()",
"in.nextInt",
"in",
"int m = in.nextInt();",
"m",
"in.nextInt()",
"in.nextInt",
"in",
"double h_ang = (h*30) + (m*0.5);",
"h_ang",
"(h*30) + (m*0.5)",
"(h*30)",
"h",
"30",
"(m*0.5)",
"m",
"0.5",
"double m_ang = m*6;",
"m_ang",
"m*6",
"m",
"6",
"double tmp = 0;",
"tmp",
"0",
"if(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}",
"h>m",
"h",
"m",
"{\n\t\t\ttmp = h_ang - m_ang;\n\t\t}",
"tmp = h_ang - m_ang",
"tmp",
"h_ang - m_ang",
"h_ang",
"m_ang",
"{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}",
"tmp = m_ang - h_ang",
"tmp",
"m_ang - h_ang",
"m_ang",
"h_ang",
"if(tmp>180){\n\t\t\ttmp-=360;\n\t\t}",
"tmp>180",
"tmp",
"180",
"{\n\t\t\ttmp-=360;\n\t\t}",
"tmp-=360",
"tmp",
"360",
"double cos = Math.cos(Math.toRadians(tmp));",
"cos",
"Math.cos(Math.toRadians(tmp))",
"Math.cos",
"Math",
"Math.toRadians(tmp)",
"Math.toRadians",
"Math",
"tmp",
"double result = (a*a) + (b*b) - (2*a*b*cos);",
"result",
"(a*a) + (b*b) - (2*a*b*cos)",
"(a*a) + (b*b)",
"(a*a)",
"a",
"a",
"(b*b)",
"b",
"b",
"(2*a*b*cos)",
"b",
"2*a*b*cos",
"2",
"a",
"b",
"cos",
"System.out.println(Math.sqrt(result))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(result)",
"Math.sqrt",
"Math",
"result",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\tint a = in.nextInt();\n\t\tint b = in.nextInt();\n\t\tint h = in.nextInt();\n\t\tint m = in.nextInt();\n\t\tdouble h_ang = (h*30) + (m*0.5);\n\t\tdouble m_ang = m*6;\n\t\tdouble tmp = 0;\n\t\tif(h>m){\n\t\t\ttmp = h_ang - m_ang;\n\t\t}else{\n\t\t\ttmp = m_ang - h_ang;\n\t\t}\n\t\tif(tmp>180){\n\t\t\ttmp-=360;\n\t\t}\n\t\tdouble cos = Math.cos(Math.toRadians(tmp));\n\t\tdouble result = (a*a) + (b*b) - (2*a*b*cos);\n\t\tSystem.out.println(Math.sqrt(result));\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner in = new Scanner(System.in);
int a = in.nextInt();
int b = in.nextInt();
int h = in.nextInt();
int m = in.nextInt();
double h_ang = (h*30) + (m*0.5);
double m_ang = m*6;
double tmp = 0;
if(h>m){
tmp = h_ang - m_ang;
}else{
tmp = m_ang - h_ang;
}
if(tmp>180){
tmp-=360;
}
double cos = Math.cos(Math.toRadians(tmp));
double result = (a*a) + (b*b) - (2*a*b*cos);
System.out.println(Math.sqrt(result));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
11,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
11,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
11,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
11,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
11,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
11,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
11,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
11,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
117,
118
],
[
116,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
131,
132
],
[
131,
133
],
[
9,
134
],
[
134,
135
]
] |
[
"import java.util.*;\nimport java.io.*;\n\nclass Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int H = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n\n int mins = 60*H+M;\n\n double M_angle = M*6;\n double H_angle = mins*0.5;\n\n double x1 = A*Math.cos(Math.toRadians(H_angle));\n double y1 = A*Math.sin(Math.toRadians(H_angle));\n double x2 = B*Math.cos(Math.toRadians(M_angle));\n double y2 = B*Math.sin(Math.toRadians(M_angle));\n\n System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)));\n\n\n\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int H = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n\n int mins = 60*H+M;\n\n double M_angle = M*6;\n double H_angle = mins*0.5;\n\n double x1 = A*Math.cos(Math.toRadians(H_angle));\n double y1 = A*Math.sin(Math.toRadians(H_angle));\n double x2 = B*Math.cos(Math.toRadians(M_angle));\n double y2 = B*Math.sin(Math.toRadians(M_angle));\n\n System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)));\n\n\n\n }\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int H = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n\n int mins = 60*H+M;\n\n double M_angle = M*6;\n double H_angle = mins*0.5;\n\n double x1 = A*Math.cos(Math.toRadians(H_angle));\n double y1 = A*Math.sin(Math.toRadians(H_angle));\n double x2 = B*Math.cos(Math.toRadians(M_angle));\n double y2 = B*Math.sin(Math.toRadians(M_angle));\n\n System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)));\n\n\n\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int A = Integer.parseInt(st.nextToken());\n int B = Integer.parseInt(st.nextToken());\n int H = Integer.parseInt(st.nextToken());\n int M = Integer.parseInt(st.nextToken());\n\n int mins = 60*H+M;\n\n double M_angle = M*6;\n double H_angle = mins*0.5;\n\n double x1 = A*Math.cos(Math.toRadians(H_angle));\n double y1 = A*Math.sin(Math.toRadians(H_angle));\n double x2 = B*Math.cos(Math.toRadians(M_angle));\n double y2 = B*Math.sin(Math.toRadians(M_angle));\n\n System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)));\n\n\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"int A = Integer.parseInt(st.nextToken());",
"A",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int B = Integer.parseInt(st.nextToken());",
"B",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int H = Integer.parseInt(st.nextToken());",
"H",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int M = Integer.parseInt(st.nextToken());",
"M",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int mins = 60*H+M;",
"mins",
"60*H+M",
"60*H",
"60",
"H",
"M",
"double M_angle = M*6;",
"M_angle",
"M*6",
"M",
"6",
"double H_angle = mins*0.5;",
"H_angle",
"mins*0.5",
"mins",
"0.5",
"double x1 = A*Math.cos(Math.toRadians(H_angle));",
"x1",
"A*Math.cos(Math.toRadians(H_angle))",
"A",
"Math.cos(Math.toRadians(H_angle))",
"Math.cos",
"Math",
"Math.toRadians(H_angle)",
"Math.toRadians",
"Math",
"H_angle",
"double y1 = A*Math.sin(Math.toRadians(H_angle));",
"y1",
"A*Math.sin(Math.toRadians(H_angle))",
"A",
"Math.sin(Math.toRadians(H_angle))",
"Math.sin",
"Math",
"Math.toRadians(H_angle)",
"Math.toRadians",
"Math",
"H_angle",
"double x2 = B*Math.cos(Math.toRadians(M_angle));",
"x2",
"B*Math.cos(Math.toRadians(M_angle))",
"B",
"Math.cos(Math.toRadians(M_angle))",
"Math.cos",
"Math",
"Math.toRadians(M_angle)",
"Math.toRadians",
"Math",
"M_angle",
"double y2 = B*Math.sin(Math.toRadians(M_angle));",
"y2",
"B*Math.sin(Math.toRadians(M_angle))",
"B",
"Math.sin(Math.toRadians(M_angle))",
"Math.sin",
"Math",
"Math.toRadians(M_angle)",
"Math.toRadians",
"Math",
"M_angle",
"System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1))",
"Math.sqrt",
"Math",
"(x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)",
"(x2-x1)*(x2-x1)",
"(x2-x1)",
"x2",
"x1",
"(x2-x1)",
"x2",
"x1",
"(y2-y1)*(y2-y1)",
"(y2-y1)",
"y2",
"y1",
"(y2-y1)",
"y2",
"y1",
"String[] args",
"args"
] |
import java.util.*;
import java.io.*;
class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
int A = Integer.parseInt(st.nextToken());
int B = Integer.parseInt(st.nextToken());
int H = Integer.parseInt(st.nextToken());
int M = Integer.parseInt(st.nextToken());
int mins = 60*H+M;
double M_angle = M*6;
double H_angle = mins*0.5;
double x1 = A*Math.cos(Math.toRadians(H_angle));
double y1 = A*Math.sin(Math.toRadians(H_angle));
double x2 = B*Math.cos(Math.toRadians(M_angle));
double y2 = B*Math.sin(Math.toRadians(M_angle));
System.out.println(Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)));
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
2,
13,
17,
41,
13,
2,
17,
2,
2,
17,
13,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
139,
8
],
[
8,
9
],
[
139,
10
],
[
10,
11
],
[
139,
12
],
[
12,
13
],
[
139,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
139,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
27,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
27,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
27,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
27,
51
],
[
51,
52
],
[
52,
53
],
[
27,
54
],
[
54,
55
],
[
139,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
58,
73
],
[
73,
74
],
[
73,
75
],
[
58,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
76,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
58,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
58,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
114,
118
],
[
107,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
119,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
58,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n double a;\n double b;\n double h;\n double m;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n double a;\n double b;\n double h;\n double m;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }\n}",
"Main",
"// 変数一覧\n double a;",
"a",
"double b;",
"b",
"double h;",
"h",
"double m;",
"m",
"public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }",
"main",
"{\n Main main = new Main();\n main.run();\n }",
"Main main = new Main();",
"main",
"new Main()",
"main.run()",
"main.run",
"main",
"String[] args",
"args",
"public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }",
"run",
"{\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"a = sc.nextDouble()",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"b = sc.nextDouble()",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"h = sc.nextDouble()",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"m = sc.nextDouble()",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"sc.close()",
"sc.close",
"sc",
"solve()",
"solve",
"private void solve() {\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }",
"solve",
"{\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }",
"double m_deg = m * 6.0;",
"m_deg",
"m * 6.0",
"m",
"6.0",
"double h_deg = 0.5 * (60.0 * h + m);",
"h_deg",
"0.5 * (60.0 * h + m)",
"0.5",
"(60.0 * h + m)",
"60.0 * h",
"60.0",
"h",
"m",
"double deg = 0;",
"deg",
"0",
"if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }",
"h_deg > m_deg",
"h_deg",
"m_deg",
"{\n deg = h_deg - m_deg;\n }",
"deg = h_deg - m_deg",
"deg",
"h_deg - m_deg",
"h_deg",
"m_deg",
"{\n deg = m_deg - h_deg;\n }",
"deg = m_deg - h_deg",
"deg",
"m_deg - h_deg",
"m_deg",
"h_deg",
"if (deg > 180.0) {\n deg = 360 - deg;\n }",
"deg > 180.0",
"deg",
"180.0",
"{\n deg = 360 - deg;\n }",
"deg = 360 - deg",
"deg",
"360 - deg",
"360",
"deg",
"double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));",
"ans",
"Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))))",
"Math.sqrt",
"Math",
"Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg)))",
"Math.pow(a, 2.0) + Math.pow(b, 2.0)",
"Math.pow(a, 2.0)",
"Math.pow",
"Math",
"a",
"2.0",
"Math.pow(b, 2.0)",
"Math.pow",
"Math",
"b",
"2.0",
"(2.0 * a * b * Math.cos(Math.toRadians(deg)))",
"b",
"2.0 * a * b * Math.cos(Math.toRadians(deg))",
"2.0",
"a",
"b",
"Math.cos(Math.toRadians(deg))",
"Math.cos",
"Math",
"Math.toRadians(deg)",
"Math.toRadians",
"Math",
"deg",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n double a;\n double b;\n double h;\n double m;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Main main = new Main();\n main.run();\n }\n \n // 変数一覧\n double a;\n double b;\n double h;\n double m;\n\n public void run() {\n // 入力情報取得\n Scanner sc = new Scanner(System.in);\n a = sc.nextDouble();\n b = sc.nextDouble();\n h = sc.nextDouble();\n m = sc.nextDouble();\n sc.close();\n\n // 解答処理\n solve();\n }\n \n private void solve() {\n \n double m_deg = m * 6.0;\n double h_deg = 0.5 * (60.0 * h + m);\n double deg = 0;\n if (h_deg > m_deg) {\n deg = h_deg - m_deg;\n } else {\n deg = m_deg - h_deg;\n }\n\n if (deg > 180.0) {\n deg = 360 - deg;\n }\n\n double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));\n\n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.run();
}
// 変数一覧
double a;
double b;
double h;
double m;
public void run() {
// 入力情報取得
Scanner sc = new Scanner(System.in);
a = sc.nextDouble();
b = sc.nextDouble();
h = sc.nextDouble();
m = sc.nextDouble();
sc.close();
// 解答処理
solve();
}
private void solve() {
double m_deg = m * 6.0;
double h_deg = 0.5 * (60.0 * h + m);
double deg = 0;
if (h_deg > m_deg) {
deg = h_deg - m_deg;
} else {
deg = m_deg - h_deg;
}
if (deg > 180.0) {
deg = 360 - deg;
}
double ans = Math.sqrt(Math.pow(a, 2.0) + Math.pow(b, 2.0) - (2.0 * a * b * Math.cos(Math.toRadians(deg))));
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
2,
2,
13,
17,
13,
17,
2,
17,
17,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
13,
17,
18,
13,
13,
41,
13,
2,
2,
13,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
17,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
136,
17
],
[
136,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
26,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
45,
47
],
[
20,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
53,
55
],
[
20,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
20,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
20,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
73,
81
],
[
81,
82
],
[
81,
83
],
[
20,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
20,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
20,
104
],
[
104,
105
],
[
104,
106
],
[
107,
107
],
[
107,
108
],
[
107,
109
],
[
107,
110
],
[
20,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
113,
121
],
[
121,
122
],
[
121,
123
],
[
20,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
18,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class Main {\n\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"public class Main {\n\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str[] = br.readLine().split(\" \");",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int a = Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b = Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"int h = Integer.parseInt(str[2]);",
"h",
"Integer.parseInt(str[2])",
"Integer.parseInt",
"Integer",
"str[2]",
"str",
"2",
"int m = Integer.parseInt(str[3]);",
"m",
"Integer.parseInt(str[3])",
"Integer.parseInt",
"Integer",
"str[3]",
"str",
"3",
"double mk = (double) (m * 360) / 60;",
"mk",
"(double) (m * 360) / 60",
"(double) (m * 360)",
"m",
"360",
"60",
"double hk = (double) (h * 60 + m) * 360 / (12 * 60);",
"hk",
"(double) (h * 60 + m) * 360 / (12 * 60)",
"(double) (h * 60 + m) * 360",
"(double) (h * 60 + m)",
"h * 60",
"h",
"60",
"m",
"360",
"(12 * 60)",
"12",
"60",
"double sita = Math.abs(mk - hk);",
"sita",
"Math.abs(mk - hk)",
"Math.abs",
"Math",
"mk - hk",
"mk",
"hk",
"double cos = Math.cos((double) sita / 180 * Math.PI);",
"cos",
"Math.cos((double) sita / 180 * Math.PI)",
"Math.cos",
"Math",
"(double) sita / 180 * Math.PI",
"(double) sita / 180",
"(double) sita",
"180",
"Math.PI",
"Math",
"Math.PI",
"double naiseki = a * b * cos;",
"naiseki",
"a * b * cos",
"a * b * cos",
"a",
"b",
"cos",
"double ans = a * a + b * b - 2 * naiseki;",
"ans",
"a * a + b * b - 2 * naiseki",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2 * naiseki",
"2",
"naiseki",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String args[]",
"args",
"public class Main {\n\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString str[] = br.readLine().split(\" \");\n\n\t\tint a = Integer.parseInt(str[0]);\n\t\tint b = Integer.parseInt(str[1]);\n\t\tint h = Integer.parseInt(str[2]);\n\t\tint m = Integer.parseInt(str[3]);\n\n\t\tdouble mk = (double) (m * 360) / 60;\n\t\tdouble hk = (double) (h * 60 + m) * 360 / (12 * 60);\n\n\t\tdouble sita = Math.abs(mk - hk);\n\t\tdouble cos = Math.cos((double) sita / 180 * Math.PI);\n\n\t\tdouble naiseki = a * b * cos;\n\t\tdouble ans = a * a + b * b - 2 * naiseki;\n\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str[] = br.readLine().split(" ");
int a = Integer.parseInt(str[0]);
int b = Integer.parseInt(str[1]);
int h = Integer.parseInt(str[2]);
int m = Integer.parseInt(str[3]);
double mk = (double) (m * 360) / 60;
double hk = (double) (h * 60 + m) * 360 / (12 * 60);
double sita = Math.abs(mk - hk);
double cos = Math.cos((double) sita / 180 * Math.PI);
double naiseki = a * b * cos;
double ans = a * a + b * b - 2 * naiseki;
System.out.println(Math.sqrt(ans));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
41,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
105,
8
],
[
105,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
11,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
11,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
11,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
11,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
11,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
11,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
9,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] |
[
"import java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int num1 = sc.nextInt();",
"num1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int num2 = sc.nextInt();",
"num2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int hour = sc.nextInt();",
"hour",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int min = sc.nextInt();",
"min",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double degOfMin = min*6;",
"degOfMin",
"min*6",
"min",
"6",
"double degOfHour = hour*30 + degOfMin/12;",
"degOfHour",
"hour*30 + degOfMin/12",
"hour*30",
"hour",
"30",
"degOfMin/12",
"degOfMin",
"12",
"double deg = Math.abs(degOfHour - degOfMin);",
"deg",
"Math.abs(degOfHour - degOfMin)",
"Math.abs",
"Math",
"degOfHour - degOfMin",
"degOfHour",
"degOfMin",
"if (deg > 180){deg = 360 - deg;}",
"deg > 180",
"deg",
"180",
"{deg = 360 - deg;}",
"deg = 360 - deg",
"deg",
"360 - deg",
"360",
"deg",
"double rad = Math.toRadians(deg);",
"rad",
"Math.toRadians(deg)",
"Math.toRadians",
"Math",
"deg",
"double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));",
"num3",
"(num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad))",
"(num1*num1) + (num2*num2)",
"(num1*num1)",
"num1",
"num1",
"(num2*num2)",
"num2",
"num2",
"(2*num1*num2*Math.cos(rad))",
"num2",
"2*num1*num2*Math.cos(rad)",
"2",
"num1",
"num2",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.print(Math.sqrt(num3))",
"System.out.print",
"System.out",
"System",
"System.out",
"Math.sqrt(num3)",
"Math.sqrt",
"Math",
"num3",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num1 = sc.nextInt();\n\t\tint num2 = sc.nextInt();\n\t\tint hour = sc.nextInt();\n\t\tint min = sc.nextInt();\n\t\t\n\t\tdouble degOfMin = min*6;\n\t\tdouble degOfHour = hour*30 + degOfMin/12;\n\t\t\n double deg = Math.abs(degOfHour - degOfMin);\n if (deg > 180){deg = 360 - deg;}\n \tdouble rad = Math.toRadians(deg);\n double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));\n \n\t\tSystem.out.print(Math.sqrt(num3));\n }\n}",
"Main"
] |
import java.util.Scanner;
import java.lang.Math;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num1 = sc.nextInt();
int num2 = sc.nextInt();
int hour = sc.nextInt();
int min = sc.nextInt();
double degOfMin = min*6;
double degOfHour = hour*30 + degOfMin/12;
double deg = Math.abs(degOfHour - degOfMin);
if (deg > 180){deg = 360 - deg;}
double rad = Math.toRadians(deg);
double num3 = (num1*num1) + (num2*num2) - (2*num1*num2*Math.cos(rad));
System.out.print(Math.sqrt(num3));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
2,
13,
17,
13,
18,
13,
13,
17,
41,
13,
2,
2,
13,
18,
13,
13,
17,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
34,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
47,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
64,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
6,
88
],
[
88,
89
]
] |
[
"import java.util.Scanner;\nclass Main{\n\tpublic static void main(String[] args){\n \tScanner sr = new Scanner(System.in);\n \tint A = sr.nextInt();\n \tint B = sr.nextInt();\n \tint H = sr.nextInt();\n \tint M = sr.nextInt();\n \t\n double angleA = (H*60+M)*Math.PI/360; \n double angleB = (M*Math.PI)/30;\n double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));\n System.out.println(Math.sqrt(C));\n }\n} ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String[] args){\n \tScanner sr = new Scanner(System.in);\n \tint A = sr.nextInt();\n \tint B = sr.nextInt();\n \tint H = sr.nextInt();\n \tint M = sr.nextInt();\n \t\n double angleA = (H*60+M)*Math.PI/360; \n double angleB = (M*Math.PI)/30;\n double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));\n System.out.println(Math.sqrt(C));\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sr = new Scanner(System.in);\n \tint A = sr.nextInt();\n \tint B = sr.nextInt();\n \tint H = sr.nextInt();\n \tint M = sr.nextInt();\n \t\n double angleA = (H*60+M)*Math.PI/360; \n double angleB = (M*Math.PI)/30;\n double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));\n System.out.println(Math.sqrt(C));\n }",
"main",
"{\n \tScanner sr = new Scanner(System.in);\n \tint A = sr.nextInt();\n \tint B = sr.nextInt();\n \tint H = sr.nextInt();\n \tint M = sr.nextInt();\n \t\n double angleA = (H*60+M)*Math.PI/360; \n double angleB = (M*Math.PI)/30;\n double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));\n System.out.println(Math.sqrt(C));\n }",
"Scanner sr = new Scanner(System.in);",
"sr",
"new Scanner(System.in)",
"int A = sr.nextInt();",
"A",
"sr.nextInt()",
"sr.nextInt",
"sr",
"int B = sr.nextInt();",
"B",
"sr.nextInt()",
"sr.nextInt",
"sr",
"int H = sr.nextInt();",
"H",
"sr.nextInt()",
"sr.nextInt",
"sr",
"int M = sr.nextInt();",
"M",
"sr.nextInt()",
"sr.nextInt",
"sr",
"double angleA = (H*60+M)*Math.PI/360;",
"angleA",
"(H*60+M)*Math.PI/360",
"(H*60+M)*Math.PI",
"(H*60+M)",
"H*60",
"H",
"60",
"M",
"Math.PI",
"Math",
"Math.PI",
"360",
"double angleB = (M*Math.PI)/30;",
"angleB",
"(M*Math.PI)/30",
"(M*Math.PI)",
"M",
"Math.PI",
"Math",
"Math.PI",
"30",
"double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));",
"C",
"A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)))",
"A*A+B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"(2*A*B*Math.cos(Math.abs(angleA-angleB)))",
"B",
"2*A*B*Math.cos(Math.abs(angleA-angleB))",
"2",
"A",
"B",
"Math.cos(Math.abs(angleA-angleB))",
"Math.cos",
"Math",
"Math.abs(angleA-angleB)",
"Math.abs",
"Math",
"angleA-angleB",
"angleA",
"angleB",
"System.out.println(Math.sqrt(C))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(C)",
"Math.sqrt",
"Math",
"C",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sr = new Scanner(System.in);
int A = sr.nextInt();
int B = sr.nextInt();
int H = sr.nextInt();
int M = sr.nextInt();
double angleA = (H*60+M)*Math.PI/360;
double angleB = (M*Math.PI)/30;
double C = A*A+B*B-(2*A*B*Math.cos(Math.abs(angleA-angleB)));
System.out.println(Math.sqrt(C));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
13,
41,
13,
17,
0,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
71,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
] |
[
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double angH = 30 * H;",
"angH",
"30 * H",
"30",
"H",
"double angM = 5.5 * M;",
"angM",
"5.5 * M",
"5.5",
"M",
"double red = Math.toRadians(Math.abs(angH-angM));",
"red",
"Math.toRadians(Math.abs(angH-angM))",
"Math.toRadians",
"Math",
"Math.abs(angH-angM)",
"Math.abs",
"Math",
"angH-angM",
"angH",
"angM",
"double res = 0;",
"res",
"0",
"res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red))",
"res",
"Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red))",
"Math.sqrt",
"Math",
"A * A + B * B - 2 * A * B * Math.cos(red)",
"A * A + B * B",
"A * A",
"A",
"A",
"B * B",
"B",
"B",
"2 * A * B * Math.cos(red)",
"B",
"2 * A * B * Math.cos(red)",
"2",
"A",
"B",
"Math.cos(red)",
"Math.cos",
"Math",
"red",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double angH = 30 * H;\n double angM = 5.5 * M;\n double red = Math.toRadians(Math.abs(angH-angM));\n double res = 0;\n res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));\n System.out.println(res);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double angH = 30 * H;
double angM = 5.5 * M;
double red = Math.toRadians(Math.abs(angH-angM));
double res = 0;
res = Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(red));
System.out.println(res);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
2,
2,
13,
17,
13,
17,
2,
17,
17,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
42,
48
],
[
41,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
72,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
6,
89
],
[
89,
90
]
] |
[
"import java.util.Scanner;\nclass Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n double a = scan.nextDouble();\n double b = scan.nextDouble();\n double h = scan.nextDouble();\n double m = scan.nextDouble();\n double naga = m * 360 / 60;\n double miji = (h * 60 + m) * 360 / (12 * 60);\n double kaku = miji - naga;\n double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));\n System.out.println(result);\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n double a = scan.nextDouble();\n double b = scan.nextDouble();\n double h = scan.nextDouble();\n double m = scan.nextDouble();\n double naga = m * 360 / 60;\n double miji = (h * 60 + m) * 360 / (12 * 60);\n double kaku = miji - naga;\n double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));\n System.out.println(result);\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n double a = scan.nextDouble();\n double b = scan.nextDouble();\n double h = scan.nextDouble();\n double m = scan.nextDouble();\n double naga = m * 360 / 60;\n double miji = (h * 60 + m) * 360 / (12 * 60);\n double kaku = miji - naga;\n double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));\n System.out.println(result);\n\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n double a = scan.nextDouble();\n double b = scan.nextDouble();\n double h = scan.nextDouble();\n double m = scan.nextDouble();\n double naga = m * 360 / 60;\n double miji = (h * 60 + m) * 360 / (12 * 60);\n double kaku = miji - naga;\n double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));\n System.out.println(result);\n\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"double a = scan.nextDouble();",
"a",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double b = scan.nextDouble();",
"b",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double h = scan.nextDouble();",
"h",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double m = scan.nextDouble();",
"m",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double naga = m * 360 / 60;",
"naga",
"m * 360 / 60",
"m * 360",
"m",
"360",
"60",
"double miji = (h * 60 + m) * 360 / (12 * 60);",
"miji",
"(h * 60 + m) * 360 / (12 * 60)",
"(h * 60 + m) * 360",
"(h * 60 + m)",
"h * 60",
"h",
"60",
"m",
"360",
"(12 * 60)",
"12",
"60",
"double kaku = miji - naga;",
"kaku",
"miji - naga",
"miji",
"naga",
"double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));",
"result",
"Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)))",
"Math.sqrt",
"Math",
"a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku))",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b* Math.cos(Math.toRadians(kaku))",
"b",
"2*a*b* Math.cos(Math.toRadians(kaku))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(kaku))",
"Math.cos",
"Math",
"Math.toRadians(kaku)",
"Math.toRadians",
"Math",
"kaku",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
double a = scan.nextDouble();
double b = scan.nextDouble();
double h = scan.nextDouble();
double m = scan.nextDouble();
double naga = m * 360 / 60;
double miji = (h * 60 + m) * 360 / (12 * 60);
double kaku = miji - naga;
double result = Math.sqrt(a*a + b*b - 2*a*b* Math.cos(Math.toRadians(kaku)));
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
41,
13,
2,
2,
17,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
93,
5
],
[
93,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
59,
71
],
[
73,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
6,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double mrad = 6*M;",
"mrad",
"6*M",
"6",
"M",
"double hrad = (30*H) + (0.5*M);",
"hrad",
"(30*H) + (0.5*M)",
"(30*H)",
"30",
"H",
"(0.5*M)",
"0.5",
"M",
"double angle = Math.abs(mrad - hrad);",
"angle",
"Math.abs(mrad - hrad)",
"Math.abs",
"Math",
"mrad - hrad",
"mrad",
"hrad",
"double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));",
"C",
"Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)))",
"Math.sqrt",
"Math",
"Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle))",
"Math.pow(A,2) + Math.pow(B,2)",
"Math.pow(A,2)",
"Math.pow",
"Math",
"A",
"2",
"Math.pow(B,2)",
"Math.pow",
"Math",
"B",
"2",
"2*A*B*Math.cos(Math.toRadians(angle))",
"B",
"2*A*B*Math.cos(Math.toRadians(angle))",
"2",
"A",
"B",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"System.out.println(C)",
"System.out.println",
"System.out",
"System",
"System.out",
"C",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n int H = sc.nextInt();\n int M = sc.nextInt();\n double mrad = 6*M;\n double hrad = (30*H) + (0.5*M);\n double angle = Math.abs(mrad - hrad);\n double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));\n System.out.println(C);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double mrad = 6*M;
double hrad = (30*H) + (0.5*M);
double angle = Math.abs(mrad - hrad);
double C = Math.sqrt(Math.pow(A,2) + Math.pow(B,2) - 2*A*B*Math.cos(Math.toRadians(angle)));
System.out.println(C);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
13,
41,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
30,
0,
13,
4,
18,
13,
2,
17,
13,
41,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
159,
5
],
[
159,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
51,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
68,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
77,
89
],
[
91,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
68,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
68,
108
],
[
108,
109
],
[
109,
110
],
[
64,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
111,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
124,
128
],
[
123,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
129,
133
],
[
122,
134
],
[
136,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
111,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
144,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
111,
153
],
[
153,
154
],
[
154,
155
],
[
6,
156
],
[
156,
157
],
[
0,
158
],
[
158,
159
],
[
158,
160
]
] |
[
"\nimport java.util.Scanner;\n//import java.math.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double diff = Math.abs(h * 30 + m * 0.5 - m * 6);",
"diff",
"Math.abs(h * 30 + m * 0.5 - m * 6)",
"Math.abs",
"Math",
"h * 30 + m * 0.5 - m * 6",
"h * 30 + m * 0.5",
"h * 30",
"h",
"30",
"m * 0.5",
"m",
"0.5",
"m * 6",
"m",
"6",
"double angle = 0;",
"angle",
"0",
"if (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}",
"diff == 180",
"diff",
"180",
"{\n\t\t\tSystem.out.println(a + b);\n\t\t}",
"System.out.println(a + b)",
"System.out.println",
"System.out",
"System",
"System.out",
"a + b",
"a",
"b",
"if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}",
"diff < 180",
"diff",
"180",
"{\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}",
"angle = Math.toRadians(diff)",
"angle",
"Math.toRadians(diff)",
"Math.toRadians",
"Math",
"diff",
"double ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);",
"ans",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle)",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(angle)",
"b",
"2 * a * b * Math.cos(angle)",
"2",
"a",
"b",
"Math.cos(angle)",
"Math.cos",
"Math",
"angle",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"sc.close()",
"sc.close",
"sc",
"{\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}",
"angle = Math.toRadians(360 - diff)",
"angle",
"Math.toRadians(360 - diff)",
"Math.toRadians",
"Math",
"360 - diff",
"360",
"diff",
"double ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);",
"ans",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle)",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(angle)",
"b",
"2 * a * b * Math.cos(angle)",
"2",
"a",
"b",
"Math.cos(angle)",
"Math.cos",
"Math",
"angle",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\n\t\t// calculate angle\n\t\tdouble diff = Math.abs(h * 30 + m * 0.5 - m * 6);\n\t\tdouble angle = 0;\n\t\tif (diff == 180) {\n\t\t\tSystem.out.println(a + b);\n\t\t} else if (diff < 180) {\n\t\t\tangle = Math.toRadians(diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t} else {\n\t\t\tangle = Math.toRadians(360 - diff);\n\t\t\t// calculate distance\n\t\t\tdouble ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);\n\t\t\tSystem.out.println(Math.sqrt(ans));\n\t\t\tsc.close();\n\t\t}\n\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
//import java.math.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
// calculate angle
double diff = Math.abs(h * 30 + m * 0.5 - m * 6);
double angle = 0;
if (diff == 180) {
System.out.println(a + b);
} else if (diff < 180) {
angle = Math.toRadians(diff);
// calculate distance
double ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);
System.out.println(Math.sqrt(ans));
sc.close();
} else {
angle = Math.toRadians(360 - diff);
// calculate distance
double ans = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(angle);
System.out.println(Math.sqrt(ans));
sc.close();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
14,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
4,
18,
18,
13,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
41,
13,
2,
17,
2,
2,
13,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
2,
17,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
13,
29,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
4,
18,
13,
4,
13,
41,
13,
4,
18,
13,
4,
13,
41,
13,
4,
18,
13,
4,
13,
41,
13,
4,
18,
13,
4,
13,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
220,
11
],
[
220,
12
],
[
12,
13
],
[
12,
14
],
[
220,
15
],
[
15,
16
],
[
15,
17
],
[
220,
18
],
[
18,
19
],
[
220,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
33,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
22,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
220,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
54,
53
],
[
61,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
61,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
64,
66
],
[
51,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
50,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
50,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
50,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
50,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
50,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
50,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
50,
118
],
[
118,
119
],
[
48,
120
],
[
120,
121
],
[
48,
122
],
[
122,
123
],
[
220,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
126,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
145
],
[
145,
146
],
[
145,
147
],
[
140,
148
],
[
150,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
150,
154
],
[
124,
155
],
[
155,
156
],
[
124,
157
],
[
157,
158
],
[
124,
159
],
[
159,
160
],
[
220,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
174,
175
],
[
168,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
181,
182
],
[
168,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
168,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
195,
196
],
[
168,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
199,
201
],
[
199,
202
],
[
168,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
205,
207
],
[
205,
208
],
[
205,
209
],
[
168,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
210,
215
],
[
210,
216
],
[
161,
217
],
[
217,
218
],
[
0,
219
],
[
219,
220
],
[
219,
221
]
] |
[
"/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main{\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static PrintWriter pw = new PrintWriter(System.out);\n static StringTokenizer st;\n \n static String next()\n {\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n static double calcAngle(double h, double m) \n { \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n } \n \n // Function to find third side \n static double third_side(double a, \n double b, double c) \n { \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n} \n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static PrintWriter pw = new PrintWriter(System.out);\n static StringTokenizer st;\n \n static String next()\n {\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n static double calcAngle(double h, double m) \n { \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n } \n \n // Function to find third side \n static double third_side(double a, \n double b, double c) \n { \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n} \n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}",
"Main",
"static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"static PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"static StringTokenizer st;",
"st",
"static String next()\n {\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"st==null || !st.hasMoreElements()",
"st==null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }",
"try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }",
"catch(IOException e)\n {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"static double calcAngle(double h, double m) \n { \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n }",
"calcAngle",
"{ \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n }",
"if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\");",
"h <0 || m < 0 || h >12 || m > 60",
"h >12",
"h <0 || m < 0 || h >12 || m > 60",
"h <0",
"h",
"0",
"m < 0",
"m",
"0",
"h >12",
"h",
"12",
"m > 60",
"m",
"60",
"System.out.println(\"Wrong input\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Wrong input\"",
"if (h == 12) \n h = 0;",
"h == 12",
"h",
"12",
"h = 0",
"h",
"0",
"if (m == 60) \n m = 0;",
"m == 60",
"m",
"60",
"m = 0",
"m",
"0",
"double hour_angle = (double)(0.5 * (h*60 + m));",
"hour_angle",
"(double)(0.5 * (h*60 + m))",
"0.5",
"(h*60 + m)",
"h*60",
"h",
"60",
"m",
"double minute_angle = (double)(6*m);",
"minute_angle",
"(double)(6*m)",
"6",
"m",
"double angle = (double)Math.abs(hour_angle - minute_angle);",
"angle",
"(double)Math.abs(hour_angle - minute_angle)",
"Math.abs",
"Math",
"hour_angle - minute_angle",
"hour_angle",
"minute_angle",
"angle = (double)Math.min(360-angle, angle)",
"angle",
"(double)Math.min(360-angle, angle)",
"Math.min",
"Math",
"360-angle",
"360",
"angle",
"angle",
"return angle;",
"angle",
"double h",
"h",
"double m",
"m",
"// Function to find third side \n static double third_side(double a, \n double b, double c) \n { \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n}",
"third_side",
"{ \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n}",
"double angle =(double) Math.cos((double)Math.toRadians(c));",
"angle",
"(double) Math.cos((double)Math.toRadians(c))",
"Math.cos",
"Math",
"(double)Math.toRadians(c)",
"Math.toRadians",
"Math",
"c",
"return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle);",
"(double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle)",
"Math.sqrt",
"Math",
"(a * a) + \n (b * b) - 2 * a * b * angle",
"(a * a) + \n (b * b)",
"(a * a)",
"a",
"a",
"(b * b)",
"b",
"b",
"2 * a * b * angle",
"b",
"2 * a * b * angle",
"2",
"a",
"b",
"angle",
"double a",
"a",
"double b",
"b",
"double c",
"c",
"public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}",
"main",
"{\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}",
"try{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}",
"catch(Exception e)\n\t\t {}",
"Exception e",
"{}",
"{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t }",
"double a=Double.parseDouble(next());",
"a",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"double b=Double.parseDouble(next());",
"b",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"double h=Double.parseDouble(next());",
"h",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"double m=Double.parseDouble(next());",
"m",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"double angle=calcAngle(h,m);",
"angle",
"calcAngle(h,m)",
"calcAngle",
"h",
"m",
"double side=third_side(a,b,angle);",
"side",
"third_side(a,b,angle)",
"third_side",
"a",
"b",
"angle",
"System.out.printf(\"%.20f\",side)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"side",
"String[] args",
"args",
"public class Main{\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static PrintWriter pw = new PrintWriter(System.out);\n static StringTokenizer st;\n \n static String next()\n {\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n static double calcAngle(double h, double m) \n { \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n } \n \n // Function to find third side \n static double third_side(double a, \n double b, double c) \n { \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n} \n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}",
"public class Main{\n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static PrintWriter pw = new PrintWriter(System.out);\n static StringTokenizer st;\n \n static String next()\n {\n while(st==null || !st.hasMoreElements()) \n {\n try\n {\n st = new StringTokenizer(br.readLine());\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n \n static double calcAngle(double h, double m) \n { \n // validate the input \n if (h <0 || m < 0 || h >12 || m > 60) \n System.out.println(\"Wrong input\"); \n \n if (h == 12) \n h = 0; \n if (m == 60) \n m = 0; \n \n // Calculate the angles moved by hour and minute hands \n // with reference to 12:00 \n double hour_angle = (double)(0.5 * (h*60 + m)); \n double minute_angle = (double)(6*m); \n \n // Find the difference between two angles \n double angle = (double)Math.abs(hour_angle - minute_angle); \n \n // smaller angle of two possible angles \n angle = (double)Math.min(360-angle, angle); \n \n return angle; \n } \n \n // Function to find third side \n static double third_side(double a, \n double b, double c) \n { \n double angle =(double) Math.cos((double)Math.toRadians(c));\n \n return (double)Math.sqrt((a * a) + \n (b * b) - 2 * a * b * angle); \n} \n public static void main (String[] args) throws java.lang.Exception\n {\n\ttry{\n\t \n\t\t double a=Double.parseDouble(next());\n\t\t double b=Double.parseDouble(next());\n\t\t double h=Double.parseDouble(next());\n\t\t double m=Double.parseDouble(next());\n\t\t \n\t\t double angle=calcAngle(h,m);\n\t\t double side=third_side(a,b,angle);\n\t\t System.out.printf(\"%.20f\",side);\n\t\t \n\t\t \n\t\t \n\t } \n\tcatch(Exception e)\n\t\t {}\n\t}\n}",
"Main"
] |
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main{
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter pw = new PrintWriter(System.out);
static StringTokenizer st;
static String next()
{
while(st==null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch(IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
static double calcAngle(double h, double m)
{
// validate the input
if (h <0 || m < 0 || h >12 || m > 60)
System.out.println("Wrong input");
if (h == 12)
h = 0;
if (m == 60)
m = 0;
// Calculate the angles moved by hour and minute hands
// with reference to 12:00
double hour_angle = (double)(0.5 * (h*60 + m));
double minute_angle = (double)(6*m);
// Find the difference between two angles
double angle = (double)Math.abs(hour_angle - minute_angle);
// smaller angle of two possible angles
angle = (double)Math.min(360-angle, angle);
return angle;
}
// Function to find third side
static double third_side(double a,
double b, double c)
{
double angle =(double) Math.cos((double)Math.toRadians(c));
return (double)Math.sqrt((a * a) +
(b * b) - 2 * a * b * angle);
}
public static void main (String[] args) throws java.lang.Exception
{
try{
double a=Double.parseDouble(next());
double b=Double.parseDouble(next());
double h=Double.parseDouble(next());
double m=Double.parseDouble(next());
double angle=calcAngle(h,m);
double side=third_side(a,b,angle);
System.out.printf("%.20f",side);
}
catch(Exception e)
{}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
2,
13,
2,
13,
17,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
59,
71
],
[
73,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
86,
90
],
[
6,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextDouble();",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m = sc.nextDouble();",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double theta1 = 30.0d * (h + (m / 60.0D));",
"theta1",
"30.0d * (h + (m / 60.0D))",
"30.0d",
"(h + (m / 60.0D))",
"h",
"(m / 60.0D)",
"m",
"60.0D",
"double theta2 = 6.0d * m;",
"theta2",
"6.0d * m",
"6.0d",
"m",
"double theta = Math.toRadians(theta2 - theta1);",
"theta",
"Math.toRadians(theta2 - theta1)",
"Math.toRadians",
"Math",
"theta2 - theta1",
"theta2",
"theta1",
"double c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));",
"c",
"Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta))",
"Math.sqrt",
"Math",
"Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta)",
"Math.pow(a, 2.0D) + Math.pow(b, 2.0D)",
"Math.pow(a, 2.0D)",
"Math.pow",
"Math",
"a",
"2.0D",
"Math.pow(b, 2.0D)",
"Math.pow",
"Math",
"b",
"2.0D",
"2.0D * a * b * Math.cos(theta)",
"b",
"2.0D * a * b * Math.cos(theta)",
"2.0D",
"a",
"b",
"Math.cos(theta)",
"Math.cos",
"Math",
"theta",
"System.out.println(String.format(\"%.20f\", c))",
"System.out.println",
"System.out",
"System",
"System.out",
"String.format(\"%.20f\", c)",
"String.format",
"String",
"\"%.20f\"",
"c",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\n\t\tdouble theta1 = 30.0d * (h + (m / 60.0D));\n\t\tdouble theta2 = 6.0d * m;\n\n\t\tdouble theta = Math.toRadians(theta2 - theta1);\n\t\tdouble c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));\n\n\t\tSystem.out.println(String.format(\"%.20f\", c));\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
double theta1 = 30.0d * (h + (m / 60.0D));
double theta2 = 6.0d * m;
double theta = Math.toRadians(theta2 - theta1);
double c = Math.sqrt(Math.pow(a, 2.0D) + Math.pow(b, 2.0D) - 2.0D * a * b * Math.cos(theta));
System.out.println(String.format("%.20f", c));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
0,
13,
2,
2,
13,
17,
2,
13,
17,
0,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
2,
2,
13,
17,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
98,
8
],
[
98,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
11,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
11,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
57,
59
],
[
11,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
72,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
11,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
9,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] |
[
"import java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n\t\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n\t\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main",
"public static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"double a = scan.nextDouble();",
"a",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double b = scan.nextDouble();",
"b",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double h = scan.nextDouble();",
"h",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double m = scan.nextDouble();",
"m",
"scan.nextDouble()",
"scan.nextDouble",
"scan",
"double ans = 0;",
"ans",
"0",
"h = h * 30 + m * 0.5",
"h",
"h * 30 + m * 0.5",
"h * 30",
"h",
"30",
"m * 0.5",
"m",
"0.5",
"m = m * 6",
"m",
"m * 6",
"m",
"6",
"double angle = Math.abs(h - m);",
"angle",
"Math.abs(h - m)",
"Math.abs",
"Math",
"h - m",
"h",
"m",
"ans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI)",
"ans",
"a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI)",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b*Math.cos(angle/180*Math.PI)",
"b",
"2*a*b*Math.cos(angle/180*Math.PI)",
"2",
"a",
"b",
"Math.cos(angle/180*Math.PI)",
"Math.cos",
"Math",
"angle/180*Math.PI",
"angle/180",
"angle",
"180",
"Math.PI",
"Math",
"Math.PI",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String args[]",
"args",
"public class Main {\n\t\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"public class Main {\n\t\tpublic static void main (String args[]) throws Exception{\n\t\tScanner scan = new Scanner(System.in);\n\t\tdouble a = scan.nextDouble();\n\t\tdouble b = scan.nextDouble();\n\t\tdouble h = scan.nextDouble();\n\t\tdouble m = scan.nextDouble();\n\t\tdouble ans = 0;\n\t\th = h * 30 + m * 0.5;\n\t\tm = m * 6;\n\t\tdouble angle = Math.abs(h - m);\n\t\tans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main"
] |
import java.util.Scanner;
import java.lang.Math;
public class Main {
public static void main (String args[]) throws Exception{
Scanner scan = new Scanner(System.in);
double a = scan.nextDouble();
double b = scan.nextDouble();
double h = scan.nextDouble();
double m = scan.nextDouble();
double ans = 0;
h = h * 30 + m * 0.5;
m = m * 6;
double angle = Math.abs(h - m);
ans = a*a + b*b -2*a*b*Math.cos(angle/180*Math.PI);
System.out.println(Math.sqrt(ans));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
2,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
64,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
8,
77
],
[
77,
78
],
[
78,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
] |
[
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}",
"main",
"{\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}",
"Scanner keyboard = new Scanner(System.in);",
"keyboard",
"new Scanner(System.in)",
"double A = keyboard.nextDouble();",
"A",
"keyboard.nextDouble()",
"keyboard.nextDouble",
"keyboard",
"double B = keyboard.nextDouble();",
"B",
"keyboard.nextDouble()",
"keyboard.nextDouble",
"keyboard",
"int H = keyboard.nextInt();",
"H",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"int M = keyboard.nextInt();",
"M",
"keyboard.nextInt()",
"keyboard.nextInt",
"keyboard",
"double h = H*30 + M*0.5;",
"h",
"H*30 + M*0.5",
"H*30",
"H",
"30",
"M*0.5",
"M",
"0.5",
"double m = M*6;",
"m",
"M*6",
"M",
"6",
"System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m)))",
"Math.sqrt",
"Math",
"A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))",
"A*A+B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*A*B*Math.cos(Math.toRadians(h-m))",
"B",
"2*A*B*Math.cos(Math.toRadians(h-m))",
"2",
"A",
"B",
"Math.cos(Math.toRadians(h-m))",
"Math.cos",
"Math",
"Math.toRadians(h-m)",
"Math.toRadians",
"Math",
"h-m",
"h",
"m",
"keyboard.close()",
"keyboard.close",
"keyboard",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\n\t\tScanner keyboard = new Scanner(System.in);\n\n\t\tdouble A = keyboard.nextDouble();\n\t\tdouble B = keyboard.nextDouble();\n\t\tint H = keyboard.nextInt();\n\t\tint M = keyboard.nextInt();\n\t\t\n\t\tdouble h = H*30 + M*0.5; \n\t\tdouble m = M*6;\n\t\t\n\t\t\n\t\tSystem.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));\n\t\tkeyboard.close();\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
double A = keyboard.nextDouble();
double B = keyboard.nextDouble();
int H = keyboard.nextInt();
int M = keyboard.nextInt();
double h = H*30 + M*0.5;
double m = M*6;
System.out.println(Math.sqrt(A*A+B*B-2*A*B*Math.cos(Math.toRadians(h-m))));
keyboard.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
2,
2,
17,
2,
17,
13,
2,
2,
17,
13,
17,
41,
13,
41,
13,
41,
13,
2,
17,
2,
17,
13,
41,
13,
2,
2,
13,
18,
13,
13,
17,
0,
13,
2,
4,
18,
13,
13,
13,
0,
13,
2,
4,
18,
13,
13,
13,
41,
13,
2,
2,
13,
18,
13,
13,
17,
0,
13,
2,
4,
18,
13,
13,
13,
0,
13,
2,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
139,
5
],
[
139,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
39,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
8,
49
],
[
49,
50
],
[
8,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
62,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
71,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
79,
84
],
[
8,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
8,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
96,
101
],
[
8,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
104,
109
],
[
8,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
112,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
8,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
6,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double A = sc.nextDouble();",
"A",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double B = sc.nextDouble();",
"B",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double H = sc.nextDouble();",
"H",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double M = sc.nextDouble();",
"M",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double xShort;",
"xShort",
"double yShort;",
"yShort",
"double degreeShort = 90 - (30 * H) - (30 * M / 60);",
"degreeShort",
"90 - (30 * H) - (30 * M / 60)",
"90 - (30 * H) - (30 * M / 60)",
"90",
"(30 * H)",
"30",
"H",
"(30 * M / 60)",
"30 * M",
"30",
"M",
"60",
"double xLong;",
"xLong",
"double yLong;",
"yLong",
"double degreeLong = 90 - (6 * M);",
"degreeLong",
"90 - (6 * M)",
"90",
"(6 * M)",
"6",
"M",
"double radianShort = degreeShort * Math.PI / 180;",
"radianShort",
"degreeShort * Math.PI / 180",
"degreeShort * Math.PI",
"degreeShort",
"Math.PI",
"Math",
"Math.PI",
"180",
"yShort = Math.sin(radianShort) * A",
"yShort",
"Math.sin(radianShort) * A",
"Math.sin(radianShort)",
"Math.sin",
"Math",
"radianShort",
"A",
"xShort = Math.cos(radianShort) * A",
"xShort",
"Math.cos(radianShort) * A",
"Math.cos(radianShort)",
"Math.cos",
"Math",
"radianShort",
"A",
"double radianLong = degreeLong * Math.PI / 180;",
"radianLong",
"degreeLong * Math.PI / 180",
"degreeLong * Math.PI",
"degreeLong",
"Math.PI",
"Math",
"Math.PI",
"180",
"yLong = Math.sin(radianLong) * B",
"yLong",
"Math.sin(radianLong) * B",
"Math.sin(radianLong)",
"Math.sin",
"Math",
"radianLong",
"B",
"xLong = Math.cos(radianLong) * B",
"xLong",
"Math.cos(radianLong) * B",
"Math.cos(radianLong)",
"Math.cos",
"Math",
"radianLong",
"B",
"double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));",
"distance",
"Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort))",
"Math.sqrt",
"Math",
"(xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort)",
"(xLong - xShort) * (xLong - xShort)",
"(xLong - xShort)",
"xLong",
"xShort",
"(xLong - xShort)",
"xLong",
"xShort",
"(yLong - yShort) * (yLong - yShort)",
"(yLong - yShort)",
"yLong",
"yShort",
"(yLong - yShort)",
"yLong",
"yShort",
"System.out.println(distance)",
"System.out.println",
"System.out",
"System",
"System.out",
"distance",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double A = sc.nextDouble();\n double B = sc.nextDouble();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n double xShort;\n double yShort;\n double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く\n double xLong;\n double yLong;\n double degreeLong = 90 - (6 * M);\n\n double radianShort = degreeShort * Math.PI / 180;\n yShort = Math.sin(radianShort) * A;\n xShort = Math.cos(radianShort) * A;\n\n double radianLong = degreeLong * Math.PI / 180;\n yLong = Math.sin(radianLong) * B;\n xLong = Math.cos(radianLong) * B;\n\n double distance =\n Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));\n System.out.println(distance);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double A = sc.nextDouble();
double B = sc.nextDouble();
double H = sc.nextDouble();
double M = sc.nextDouble();
double xShort;
double yShort;
double degreeShort = 90 - (30 * H) - (30 * M / 60); // 時針は分針のぶんもちょっぴり動く
double xLong;
double yLong;
double degreeLong = 90 - (6 * M);
double radianShort = degreeShort * Math.PI / 180;
yShort = Math.sin(radianShort) * A;
xShort = Math.cos(radianShort) * A;
double radianLong = degreeLong * Math.PI / 180;
yLong = Math.sin(radianLong) * B;
xLong = Math.cos(radianLong) * B;
double distance =
Math.sqrt((xLong - xShort) * (xLong - xShort) + (yLong - yShort) * (yLong - yShort));
System.out.println(distance);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
2,
2,
17,
13,
13,
17,
2,
13,
17,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
40,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
63,
67
],
[
56,
68
],
[
70,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"double rad = Math.toRadians((60*H + M)* 0.5 - M*6);",
"rad",
"Math.toRadians((60*H + M)* 0.5 - M*6)",
"Math.toRadians",
"Math",
"(60*H + M)* 0.5 - M*6",
"(60*H + M)* 0.5",
"(60*H + M)",
"60*H",
"60",
"H",
"M",
"0.5",
"M*6",
"M",
"6",
"double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));",
"ans",
"Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad))",
"Math.sqrt",
"Math",
"Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad)",
"Math.pow(A, 2.0) + Math.pow(B, 2.0)",
"Math.pow(A, 2.0)",
"Math.pow",
"Math",
"A",
"2.0",
"Math.pow(B, 2.0)",
"Math.pow",
"Math",
"B",
"2.0",
"2*A*B*Math.cos(rad)",
"B",
"2*A*B*Math.cos(rad)",
"2",
"A",
"B",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n final int A = sc.nextInt();\n final int B = sc.nextInt();\n final int H = sc.nextInt();\n final int M = sc.nextInt();\n sc.close();\n double rad = Math.toRadians((60*H + M)* 0.5 - M*6);\n double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));\n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
final int A = sc.nextInt();
final int B = sc.nextInt();
final int H = sc.nextInt();
final int M = sc.nextInt();
sc.close();
double rad = Math.toRadians((60*H + M)* 0.5 - M*6);
double ans = Math.sqrt(Math.pow(A, 2.0) + Math.pow(B, 2.0) - 2*A*B*Math.cos(rad));
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
20,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
17,
13,
41,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
17,
0,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
29
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
6,
12
],
[
12,
13
],
[
0,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
18,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
18,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
18,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
18,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
48,
50
],
[
18,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
18,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
18,
64
],
[
64,
65
],
[
64,
66
],
[
18,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
18,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
18,
99
]
] |
[
"import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n new Solver().run();\n }\n}\n\nclass Solver {\n\n public void run() {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double hr = (H * 30) + 0.5 * M;\n double mr = (M * 6);\n \n double ra = Math.abs(hr - mr);\n //double ra = hr - mr;\n\n double ans = 0;\n\n ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra));\n\n System.out.println(Math.sqrt(ans));\n\n return;\n }\n\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args) {\n new Solver().run();\n }\n}",
"Main",
"public static void main(String[] args) {\n new Solver().run();\n }",
"main",
"{\n new Solver().run();\n }",
"new Solver().run()",
"new Solver().run",
"new Solver()",
"String[] args",
"args",
"class Solver {\n\n public void run() {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double hr = (H * 30) + 0.5 * M;\n double mr = (M * 6);\n \n double ra = Math.abs(hr - mr);\n //double ra = hr - mr;\n\n double ans = 0;\n\n ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra));\n\n System.out.println(Math.sqrt(ans));\n\n return;\n }\n\n}",
"Solver",
"public void run() {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double hr = (H * 30) + 0.5 * M;\n double mr = (M * 6);\n \n double ra = Math.abs(hr - mr);\n //double ra = hr - mr;\n\n double ans = 0;\n\n ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra));\n\n System.out.println(Math.sqrt(ans));\n\n return;\n }",
"run",
"{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n\n int H = sc.nextInt();\n int M = sc.nextInt();\n\n double hr = (H * 30) + 0.5 * M;\n double mr = (M * 6);\n \n double ra = Math.abs(hr - mr);\n //double ra = hr - mr;\n\n double ans = 0;\n\n ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra));\n\n System.out.println(Math.sqrt(ans));\n\n return;\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double hr = (H * 30) + 0.5 * M;",
"hr",
"(H * 30) + 0.5 * M",
"(H * 30)",
"H",
"30",
"0.5 * M",
"0.5",
"M",
"double mr = (M * 6);",
"mr",
"(M * 6)",
"M",
"6",
"double ra = Math.abs(hr - mr);",
"ra",
"Math.abs(hr - mr)",
"Math.abs",
"Math",
"hr - mr",
"hr",
"mr",
"double ans = 0;",
"ans",
"0",
"ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra))",
"ans",
"A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra))",
"A * A + B * B",
"A * A",
"A",
"A",
"B * B",
"B",
"B",
"(2 * A * B) * Math.cos(Math.toRadians(ra))",
"(2 * A * B)",
"2 * A * B",
"2",
"A",
"B",
"Math.cos(Math.toRadians(ra))",
"Math.cos",
"Math",
"Math.toRadians(ra)",
"Math.toRadians",
"Math",
"ra",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"return;"
] |
import java.util.*;
class Main {
public static void main(String[] args) {
new Solver().run();
}
}
class Solver {
public void run() {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double hr = (H * 30) + 0.5 * M;
double mr = (M * 6);
double ra = Math.abs(hr - mr);
//double ra = hr - mr;
double ans = 0;
ans = A * A + B * B - (2 * A * B) * Math.cos(Math.toRadians(ra));
System.out.println(Math.sqrt(ans));
return;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
2,
2,
2,
13,
17,
13,
13,
41,
13,
2,
13,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
126,
8
],
[
126,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
11,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
11,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
11,
55
],
[
55,
56
],
[
55,
57
],
[
11,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
11,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
11,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
11,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
97,
101
],
[
96,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
102,
106
],
[
95,
107
],
[
109,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
113,
116
],
[
11,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
9,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] |
[
"import java.util.Scanner;\nimport java.lang.Math;\n\npublic class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int a = scanner.nextInt();",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int b = scanner.nextInt();",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int h = scanner.nextInt();",
"h",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int m = scanner.nextInt();",
"m",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;",
"SHORT_HAND_ANGLE_PER_MINUTE",
"0.5",
"final double LONG_HAND_ANGLE_PER_MINUTE = 6;",
"LONG_HAND_ANGLE_PER_MINUTE",
"6",
"double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;",
"angleHour",
"(h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE",
"(h * 60 + m)",
"h * 60",
"h",
"60",
"m",
"SHORT_HAND_ANGLE_PER_MINUTE",
"double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;",
"angleMinute",
"m * LONG_HAND_ANGLE_PER_MINUTE",
"m",
"LONG_HAND_ANGLE_PER_MINUTE",
"double eggplantAngle = 0;",
"eggplantAngle",
"0",
"if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }",
"angleHour <= angleMinute",
"angleHour",
"angleMinute",
"{\n eggplantAngle = angleMinute - angleHour;\n }",
"eggplantAngle = angleMinute - angleHour",
"eggplantAngle",
"angleMinute - angleHour",
"angleMinute",
"angleHour",
"{\n eggplantAngle = angleHour - angleMinute;\n }",
"eggplantAngle = angleHour - angleMinute",
"eggplantAngle",
"angleHour - angleMinute",
"angleHour",
"angleMinute",
"if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }",
"eggplantAngle > 180",
"eggplantAngle",
"180",
"{\n eggplantAngle = 360 - eggplantAngle;\n }",
"eggplantAngle = 360 - eggplantAngle",
"eggplantAngle",
"360 - eggplantAngle",
"360",
"eggplantAngle",
"double radian = Math.toRadians(eggplantAngle);",
"radian",
"Math.toRadians(eggplantAngle)",
"Math.toRadians",
"Math",
"eggplantAngle",
"double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));",
"c",
"Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian))",
"Math.sqrt",
"Math",
"Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian)",
"Math.pow(a,2) + Math.pow(b,2)",
"Math.pow(a,2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b,2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(radian)",
"b",
"2 * a * b * Math.cos(radian)",
"2",
"a",
"b",
"Math.cos(radian)",
"Math.cos",
"Math",
"radian",
"System.out.println(c)",
"System.out.println",
"System.out",
"System",
"System.out",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner scanner = new Scanner(System.in);\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n\n final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;\n final double LONG_HAND_ANGLE_PER_MINUTE = 6;\n\n double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;\n double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;\n\n double eggplantAngle = 0;\n if(angleHour <= angleMinute){\n eggplantAngle = angleMinute - angleHour;\n }else{\n eggplantAngle = angleHour - angleMinute;\n }\n\n if(eggplantAngle > 180){\n eggplantAngle = 360 - eggplantAngle;\n }\n\n double radian = Math.toRadians(eggplantAngle);\n\n double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));\n System.out.println(c);\n }\n}",
"Main"
] |
import java.util.Scanner;
import java.lang.Math;
public class Main {
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int h = scanner.nextInt();
int m = scanner.nextInt();
final double SHORT_HAND_ANGLE_PER_MINUTE = 0.5;
final double LONG_HAND_ANGLE_PER_MINUTE = 6;
double angleHour = (h * 60 + m) * SHORT_HAND_ANGLE_PER_MINUTE;
double angleMinute = m * LONG_HAND_ANGLE_PER_MINUTE;
double eggplantAngle = 0;
if(angleHour <= angleMinute){
eggplantAngle = angleMinute - angleHour;
}else{
eggplantAngle = angleHour - angleMinute;
}
if(eggplantAngle > 180){
eggplantAngle = 360 - eggplantAngle;
}
double radian = Math.toRadians(eggplantAngle);
double c = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2 * a * b * Math.cos(radian));
System.out.println(c);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
2,
2,
17,
13,
13,
17,
17,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
4,
18,
13,
2,
13,
13,
17,
4,
18,
13,
2,
13,
13,
17,
4,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
154,
14
],
[
154,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
17,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
33,
34
],
[
17,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
17,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
17,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
17,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
62,
68
],
[
61,
69
],
[
17,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
17,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
17,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
17,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
17,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
17,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
130,
131
],
[
130,
132
],
[
127,
133
],
[
126,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
137,
139
],
[
134,
140
],
[
17,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
17,
145
],
[
145,
146
],
[
146,
147
],
[
17,
148
],
[
148,
149
],
[
149,
150
],
[
15,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }",
"BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));",
"br",
"new BufferedReader(new java.io.InputStreamReader(System.in))",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"double A = Double.parseDouble(st.nextToken());",
"A",
"Double.parseDouble(st.nextToken())",
"Double.parseDouble",
"Double",
"st.nextToken()",
"st.nextToken",
"st",
"double B = Double.parseDouble(st.nextToken());",
"B",
"Double.parseDouble(st.nextToken())",
"Double.parseDouble",
"Double",
"st.nextToken()",
"st.nextToken",
"st",
"double H = Double.parseDouble(st.nextToken());",
"H",
"Double.parseDouble(st.nextToken())",
"Double.parseDouble",
"Double",
"st.nextToken()",
"st.nextToken",
"st",
"double M = Double.parseDouble(st.nextToken());",
"M",
"Double.parseDouble(st.nextToken())",
"Double.parseDouble",
"Double",
"st.nextToken()",
"st.nextToken",
"st",
"double angle_H = (60 * H + M) / 720 * 360;",
"angle_H",
"(60 * H + M) / 720 * 360",
"(60 * H + M) / 720",
"(60 * H + M)",
"60 * H",
"60",
"H",
"M",
"720",
"360",
"double angle_M = M /60 * 360;",
"angle_M",
"M /60 * 360",
"M /60",
"M",
"60",
"360",
"double A_x = A * Math.cos(Math.toRadians(angle_H));",
"A_x",
"A * Math.cos(Math.toRadians(angle_H))",
"A",
"Math.cos(Math.toRadians(angle_H))",
"Math.cos",
"Math",
"Math.toRadians(angle_H)",
"Math.toRadians",
"Math",
"angle_H",
"double A_y = A * Math.sin(Math.toRadians(angle_H));",
"A_y",
"A * Math.sin(Math.toRadians(angle_H))",
"A",
"Math.sin(Math.toRadians(angle_H))",
"Math.sin",
"Math",
"Math.toRadians(angle_H)",
"Math.toRadians",
"Math",
"angle_H",
"double B_x = B * Math.cos(Math.toRadians(angle_M));",
"B_x",
"B * Math.cos(Math.toRadians(angle_M))",
"B",
"Math.cos(Math.toRadians(angle_M))",
"Math.cos",
"Math",
"Math.toRadians(angle_M)",
"Math.toRadians",
"Math",
"angle_M",
"double B_y = B * Math.sin(Math.toRadians(angle_M));",
"B_y",
"B * Math.sin(Math.toRadians(angle_M))",
"B",
"Math.sin(Math.toRadians(angle_M))",
"Math.sin",
"Math",
"Math.toRadians(angle_M)",
"Math.toRadians",
"Math",
"angle_M",
"double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));",
"ans",
"Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2))",
"Math.sqrt",
"Math",
"Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2)",
"Math.pow((A_x - B_x),2)",
"Math.pow",
"Math",
"(A_x - B_x)",
"A_x",
"B_x",
"2",
"Math.pow((A_y - B_y),2)",
"Math.pow",
"Math",
"(A_y - B_y)",
"A_y",
"B_y",
"2",
"pw.println(ans)",
"pw.println",
"pw",
"ans",
"br.close()",
"br.close",
"br",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n double A = Double.parseDouble(st.nextToken());\n double B = Double.parseDouble(st.nextToken());\n double H = Double.parseDouble(st.nextToken());\n double M = Double.parseDouble(st.nextToken());\n \n double angle_H = (60 * H + M) / 720 * 360;\n double angle_M = M /60 * 360;\n\n double A_x = A * Math.cos(Math.toRadians(angle_H));\n double A_y = A * Math.sin(Math.toRadians(angle_H));\n\n double B_x = B * Math.cos(Math.toRadians(angle_M));\n double B_y = B * Math.sin(Math.toRadians(angle_M));\n\n double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));\n \n pw.println(ans);\n br.close();\n pw.close();\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st = new StringTokenizer(br.readLine());
double A = Double.parseDouble(st.nextToken());
double B = Double.parseDouble(st.nextToken());
double H = Double.parseDouble(st.nextToken());
double M = Double.parseDouble(st.nextToken());
double angle_H = (60 * H + M) / 720 * 360;
double angle_M = M /60 * 360;
double A_x = A * Math.cos(Math.toRadians(angle_H));
double A_y = A * Math.sin(Math.toRadians(angle_H));
double B_x = B * Math.cos(Math.toRadians(angle_M));
double B_y = B * Math.sin(Math.toRadians(angle_M));
double ans = Math.sqrt(Math.pow((A_x - B_x),2) + Math.pow((A_y - B_y),2));
pw.println(ans);
br.close();
pw.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
13,
17,
18,
13,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
41,
13,
2,
2,
2,
13,
17,
18,
13,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
42,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
62,
69
],
[
8,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
8,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
87,
91
],
[
80,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
6,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double tmp1 = sc.nextDouble();",
"tmp1",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double tmp2 = sc.nextDouble();",
"tmp2",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;",
"h",
"tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.",
"tmp1 / 6. * Math.PI",
"tmp1 / 6.",
"tmp1",
"6.",
"Math.PI",
"Math",
"Math.PI",
"tmp2 / 30. * Math.PI / 12.",
"tmp2 / 30. * Math.PI",
"tmp2 / 30.",
"tmp2",
"30.",
"Math.PI",
"Math",
"Math.PI",
"12.",
"double m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;",
"m",
"tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.",
"tmp2 / 30. * Math.PI",
"tmp2 / 30.",
"tmp2",
"30.",
"Math.PI",
"Math",
"Math.PI",
"tmp1 / 6. * Math.PI * 12.",
"tmp1 / 6. * Math.PI * 12.",
"tmp1 / 6.",
"tmp1",
"6.",
"Math.PI",
"Math",
"Math.PI",
"12.",
"double rad = h - m;",
"rad",
"h - m",
"h",
"m",
"double res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));",
"res",
"Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)))",
"Math.sqrt",
"Math",
"Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad))",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"(2. * a * b * Math.cos(rad))",
"b",
"2. * a * b * Math.cos(rad)",
"2.",
"a",
"b",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.println(res)",
"System.out.println",
"System.out",
"System",
"System.out",
"res",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tdouble tmp1 = sc.nextDouble();\n\t\tdouble tmp2 = sc.nextDouble();\n\t\tdouble h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;\n\t\tdouble m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;\n\t\tdouble rad = h - m;\n\t\t// System.out.println(rad / Math.PI / 2. * 360.);\n\t\tdouble res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));\n\t\tSystem.out.println(res);\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
double tmp1 = sc.nextDouble();
double tmp2 = sc.nextDouble();
double h = tmp1 / 6. * Math.PI + tmp2 / 30. * Math.PI / 12.;
double m = tmp2 / 30. * Math.PI + tmp1 / 6. * Math.PI * 12.;
double rad = h - m;
// System.out.println(rad / Math.PI / 2. * 360.);
double res = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - (2. * a * b * Math.cos(rad)));
System.out.println(res);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
40,
4,
18,
13,
13,
17,
41,
13,
2,
40,
4,
18,
13,
2,
13,
2,
13,
17,
17,
41,
13,
2,
2,
4,
18,
13,
13,
13,
2,
4,
18,
13,
13,
13,
41,
13,
2,
2,
4,
18,
13,
13,
13,
2,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
13,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
34,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
57,
62
],
[
56,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
63,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
72,
77
],
[
71,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
78,
83
],
[
8,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
6,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double mm = -Math.toRadians(m)*6;",
"mm",
"-Math.toRadians(m)*6",
"-Math.toRadians(m)",
"Math.toRadians(m)",
"Math.toRadians",
"Math",
"m",
"6",
"double hh = -Math.toRadians(h+m/60)*30;",
"hh",
"-Math.toRadians(h+m/60)*30",
"-Math.toRadians(h+m/60)",
"Math.toRadians(h+m/60)",
"Math.toRadians",
"Math",
"h+m/60",
"h",
"m/60",
"m",
"60",
"30",
"double x = Math.cos(hh)*a-Math.cos(mm)*b;",
"x",
"Math.cos(hh)*a-Math.cos(mm)*b",
"Math.cos(hh)*a",
"Math.cos(hh)",
"Math.cos",
"Math",
"hh",
"a",
"Math.cos(mm)*b",
"Math.cos(mm)",
"Math.cos",
"Math",
"mm",
"b",
"double y = Math.sin(hh)*a-Math.sin(mm)*b;",
"y",
"Math.sin(hh)*a-Math.sin(mm)*b",
"Math.sin(hh)*a",
"Math.sin(hh)",
"Math.sin",
"Math",
"hh",
"a",
"Math.sin(mm)*b",
"Math.sin(mm)",
"Math.sin",
"Math",
"mm",
"b",
"System.out.println(Math.sqrt(x*x+y*y))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(x*x+y*y)",
"Math.sqrt",
"Math",
"x*x+y*y",
"x*x",
"x",
"x",
"y*y",
"y",
"y",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mm = -Math.toRadians(m)*6;\n double hh = -Math.toRadians(h+m/60)*30;\n double x = Math.cos(hh)*a-Math.cos(mm)*b;\n double y = Math.sin(hh)*a-Math.sin(mm)*b;\n System.out.println(Math.sqrt(x*x+y*y));\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextInt();
double m = sc.nextInt();
double mm = -Math.toRadians(m)*6;
double hh = -Math.toRadians(h+m/60)*30;
double x = Math.cos(hh)*a-Math.cos(mm)*b;
double y = Math.sin(hh)*a-Math.sin(mm)*b;
System.out.println(Math.sqrt(x*x+y*y));
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
2,
2,
13,
17,
13,
41,
13,
2,
13,
13,
41,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
103,
9
],
[
9,
10
],
[
9,
11
],
[
103,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
14,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
14,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
14,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
89,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
12,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n // 1分間に長針が動く角度\n private static double LONG_ANGLE = 0.5;\n // 1分間に短針が動く角度\n private static double SHORT_ANGLE = 6.0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n // 1分間に長針が動く角度\n private static double LONG_ANGLE = 0.5;\n // 1分間に短針が動く角度\n private static double SHORT_ANGLE = 6.0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }\n}",
"Main",
"// 1分間に長針が動く角度\n private static double LONG_ANGLE = 0.5;",
"LONG_ANGLE",
"0.5",
"// 1分間に短針が動く角度\n private static double SHORT_ANGLE = 6.0;",
"SHORT_ANGLE",
"6.0",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double angleH = LONG_ANGLE * (h * 60 + m);",
"angleH",
"LONG_ANGLE * (h * 60 + m)",
"LONG_ANGLE",
"(h * 60 + m)",
"h * 60",
"h",
"60",
"m",
"double angleM = SHORT_ANGLE * m;",
"angleM",
"SHORT_ANGLE * m",
"SHORT_ANGLE",
"m",
"double angle = 0;",
"angle",
"0",
"if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }",
"angleH > angleM",
"angleH",
"angleM",
"{\n angle = angleH - angleM;\n }",
"angle = angleH - angleM",
"angle",
"angleH - angleM",
"angleH",
"angleM",
"{\n angle = angleM - angleH;\n }",
"angle = angleM - angleH",
"angle",
"angleM - angleH",
"angleM",
"angleH",
"System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle)))",
"Math.sqrt",
"Math",
"a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2 * a * b * Math.cos(Math.toRadians(angle))",
"b",
"2 * a * b * Math.cos(Math.toRadians(angle))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"String[] args",
"args",
"public class Main {\n // 1分間に長針が動く角度\n private static double LONG_ANGLE = 0.5;\n // 1分間に短針が動く角度\n private static double SHORT_ANGLE = 6.0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }\n}",
"public class Main {\n // 1分間に長針が動く角度\n private static double LONG_ANGLE = 0.5;\n // 1分間に短針が動く角度\n private static double SHORT_ANGLE = 6.0;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // 長針の長さ\n int a = sc.nextInt();\n // 短針の長さ\n int b = sc.nextInt();\n\n int h = sc.nextInt();\n int m = sc.nextInt();\n\n double angleH = LONG_ANGLE * (h * 60 + m);\n double angleM = SHORT_ANGLE * m;\n double angle = 0;\n if (angleH > angleM) {\n angle = angleH - angleM;\n } else {\n angle = angleM - angleH;\n }\n\n System.out.println(\n Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
// 1分間に長針が動く角度
private static double LONG_ANGLE = 0.5;
// 1分間に短針が動く角度
private static double SHORT_ANGLE = 6.0;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 長針の長さ
int a = sc.nextInt();
// 短針の長さ
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double angleH = LONG_ANGLE * (h * 60 + m);
double angleM = SHORT_ANGLE * m;
double angle = 0;
if (angleH > angleM) {
angle = angleH - angleM;
} else {
angle = angleM - angleH;
}
System.out.println(
Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(Math.toRadians(angle))));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
17,
13,
2,
13,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
17,
13,
2,
13,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
17,
2,
17,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
17,
2,
17,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
43,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
62,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
8,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
8,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
8,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
102,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
8,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
6,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }",
"main",
"{\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int A = s.nextInt();",
"A",
"s.nextInt()",
"s.nextInt",
"s",
"int B = s.nextInt();",
"B",
"s.nextInt()",
"s.nextInt",
"s",
"int H = s.nextInt();",
"H",
"s.nextInt()",
"s.nextInt",
"s",
"int M = s.nextInt();",
"M",
"s.nextInt()",
"s.nextInt",
"s",
"double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));",
"Hx",
"A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2))",
"A",
"Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2))",
"Math.cos",
"Math",
"Math.toRadians(90 - 30 * H - (double) M / 2)",
"Math.toRadians",
"Math",
"90 - 30 * H - (double) M / 2",
"90 - 30 * H - (double) M / 2",
"90",
"30 * H",
"30",
"H",
"(double) M / 2",
"(double) M",
"2",
"double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));",
"Hy",
"A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2))",
"A",
"Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2))",
"Math.sin",
"Math",
"Math.toRadians(90 - 30 * H - (double) M / 2)",
"Math.toRadians",
"Math",
"90 - 30 * H - (double) M / 2",
"90 - 30 * H - (double) M / 2",
"90",
"30 * H",
"30",
"H",
"(double) M / 2",
"(double) M",
"2",
"double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));",
"Mx",
"B * Math.cos(Math.toRadians(90 - 6 * M))",
"B",
"Math.cos(Math.toRadians(90 - 6 * M))",
"Math.cos",
"Math",
"Math.toRadians(90 - 6 * M)",
"Math.toRadians",
"Math",
"90 - 6 * M",
"90",
"6 * M",
"6",
"M",
"double My = B * Math.sin(Math.toRadians(90 - 6 * M));",
"My",
"B * Math.sin(Math.toRadians(90 - 6 * M))",
"B",
"Math.sin(Math.toRadians(90 - 6 * M))",
"Math.sin",
"Math",
"Math.toRadians(90 - 6 * M)",
"Math.toRadians",
"Math",
"90 - 6 * M",
"90",
"6 * M",
"6",
"M",
"double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));",
"d",
"Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My))",
"Math.sqrt",
"Math",
"(Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My)",
"(Hx - Mx) * (Hx - Mx)",
"(Hx - Mx)",
"Hx",
"Mx",
"(Hx - Mx)",
"Hx",
"Mx",
"(Hy - My) * (Hy - My)",
"(Hy - My)",
"Hy",
"My",
"(Hy - My)",
"Hy",
"My",
"System.out.print(d)",
"System.out.print",
"System.out",
"System",
"System.out",
"d",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n int A = s.nextInt();\n int B = s.nextInt();\n int H = s.nextInt();\n int M = s.nextInt();\n\n double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));\n double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));\n\n double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));\n double My = B * Math.sin(Math.toRadians(90 - 6 * M));\n\n double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));\n System.out.print(d);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int A = s.nextInt();
int B = s.nextInt();
int H = s.nextInt();
int M = s.nextInt();
double Hx = A * Math.cos(Math.toRadians(90 - 30 * H - (double) M / 2));
double Hy = A * Math.sin(Math.toRadians(90 - 30 * H - (double) M / 2));
double Mx = B * Math.cos(Math.toRadians(90 - 6 * M));
double My = B * Math.sin(Math.toRadians(90 - 6 * M));
double d = Math.sqrt((Hx - Mx) * (Hx - Mx) + (Hy - My) * (Hy - My));
System.out.print(d);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
4,
18,
13,
17,
4,
18,
13,
41,
13,
2,
2,
2,
17,
18,
13,
13,
13,
2,
17,
17,
41,
13,
2,
2,
2,
17,
18,
13,
13,
2,
13,
17,
17,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
13,
2,
2,
17,
18,
13,
13,
13,
4,
18,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
4,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
6,
13,
41,
13,
12,
13,
30,
4,
13,
18,
13,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
18,
36,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
40,
17,
30,
41,
13,
17,
41,
13,
4,
18,
13,
42,
2,
2,
2,
2,
13,
17,
2,
17,
13,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
2,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
17,
13,
29,
2,
13,
13,
0,
13,
17,
0,
13,
2,
13,
17,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
18,
13,
13,
30,
41,
13,
17,
41,
13,
4,
18,
13,
42,
2,
2,
2,
2,
13,
17,
2,
17,
13,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
2,
13,
17,
42,
17,
30,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
17,
13,
3,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
13,
17,
29,
2,
13,
13,
41,
13,
17,
0,
13,
4,
18,
13,
42,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
17,
0,
13,
4,
18,
13,
29,
2,
2,
13,
13,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
4,
18,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
18,
13,
29,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
4,
18,
13,
13,
30,
0,
13,
4,
18,
13,
42,
2,
2,
13,
40,
17,
40,
4,
18,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
29,
4,
18,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
29,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
2,
13,
40,
17,
2,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
4,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
2,
13,
17,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
787,
8
],
[
787,
9
],
[
9,
10
],
[
787,
11
],
[
11,
12
],
[
787,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
787,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
20,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
46,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
44,
52
],
[
52,
53
],
[
52,
54
],
[
20,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
59,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
20,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
20,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
78,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
20,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
95,
103
],
[
105,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
787,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
113,
119
],
[
119,
120
],
[
787,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
123,
130
],
[
130,
131
],
[
123,
132
],
[
132,
133
],
[
133,
134
],
[
123,
135
],
[
135,
136
],
[
136,
137
],
[
123,
138
],
[
138,
139
],
[
139,
140
],
[
787,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
141,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
141,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
153,
161
],
[
161,
162
],
[
141,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
166,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
141,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
141,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
191,
195
],
[
195,
196
],
[
196,
197
],
[
188,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
198,
207
],
[
207,
208
],
[
209,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
210,
214
],
[
214,
215
],
[
214,
216
],
[
209,
217
],
[
217,
218
],
[
217,
219
],
[
209,
220
],
[
220,
221
],
[
220,
222
],
[
207,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
198,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
233,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
229,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
198,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
255,
257
],
[
198,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
260,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
267,
271
],
[
271,
272
],
[
271,
273
],
[
266,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
260,
278
],
[
278,
279
],
[
278,
280
],
[
260,
281
],
[
281,
282
],
[
281,
283
],
[
283,
284
],
[
283,
285
],
[
141,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
292,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
289,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
307,
308
],
[
300,
309
],
[
309,
310
],
[
311,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
316,
317
],
[
316,
318
],
[
311,
319
],
[
319,
320
],
[
319,
321
],
[
311,
322
],
[
322,
323
],
[
322,
324
],
[
309,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
300,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
335,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
343,
344
],
[
331,
345
],
[
345,
346
],
[
346,
347
],
[
346,
348
],
[
345,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
353,
354
],
[
300,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
357,
359
],
[
300,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
362,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
369,
373
],
[
373,
374
],
[
373,
375
],
[
368,
376
],
[
362,
377
],
[
377,
378
],
[
377,
379
],
[
362,
380
],
[
380,
381
],
[
380,
382
],
[
382,
383
],
[
382,
384
],
[
300,
385
],
[
385,
386
],
[
386,
387
],
[
386,
388
],
[
385,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
300,
393
],
[
393,
394
],
[
393,
395
],
[
300,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
300,
401
],
[
401,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
402,
406
],
[
406,
407
],
[
406,
408
],
[
401,
409
],
[
409,
410
],
[
410,
411
],
[
410,
412
],
[
409,
413
],
[
413,
414
],
[
413,
415
],
[
415,
416
],
[
415,
417
],
[
409,
418
],
[
418,
419
],
[
418,
420
],
[
409,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
424,
425
],
[
300,
426
],
[
426,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
427,
431
],
[
141,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
438,
442
],
[
442,
443
],
[
435,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
448,
449
],
[
444,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
451,
454
],
[
450,
455
],
[
455,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
459,
460
],
[
444,
461
],
[
461,
462
],
[
141,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
469,
470
],
[
470,
471
],
[
471,
472
],
[
469,
473
],
[
473,
474
],
[
466,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
475,
484
],
[
484,
485
],
[
485,
486
],
[
486,
487
],
[
485,
488
],
[
484,
489
],
[
489,
490
],
[
490,
491
],
[
490,
492
],
[
492,
493
],
[
493,
494
],
[
475,
495
],
[
495,
496
],
[
496,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
496,
501
],
[
501,
502
],
[
502,
503
],
[
503,
504
],
[
502,
505
],
[
495,
506
],
[
506,
507
],
[
507,
508
],
[
508,
509
],
[
507,
510
],
[
506,
511
],
[
511,
512
],
[
511,
513
],
[
513,
514
],
[
514,
515
],
[
475,
516
],
[
516,
517
],
[
517,
518
],
[
518,
519
],
[
141,
520
],
[
520,
521
],
[
520,
522
],
[
522,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
526,
527
],
[
527,
528
],
[
528,
529
],
[
526,
530
],
[
530,
531
],
[
523,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
536
],
[
536,
537
],
[
536,
538
],
[
538,
539
],
[
539,
540
],
[
532,
541
],
[
541,
542
],
[
542,
543
],
[
543,
544
],
[
543,
545
],
[
545,
546
],
[
542,
547
],
[
547,
548
],
[
547,
549
],
[
541,
550
],
[
550,
551
],
[
551,
552
],
[
552,
553
],
[
551,
554
],
[
550,
555
],
[
555,
556
],
[
555,
557
],
[
557,
558
],
[
558,
559
],
[
532,
560
],
[
560,
561
],
[
561,
562
],
[
562,
563
],
[
141,
564
],
[
564,
565
],
[
564,
566
],
[
566,
567
],
[
567,
568
],
[
567,
569
],
[
566,
571
],
[
571,
572
],
[
572,
573
],
[
573,
574
],
[
573,
575
],
[
571,
576
],
[
576,
577
],
[
576,
578
],
[
571,
579
],
[
579,
580
],
[
580,
581
],
[
571,
582
],
[
583,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
585,
587
],
[
584,
588
],
[
588,
589
],
[
566,
590
],
[
590,
591
],
[
564,
592
],
[
592,
593
],
[
141,
594
],
[
594,
595
],
[
594,
596
],
[
596,
597
],
[
597,
598
],
[
597,
599
],
[
596,
601
],
[
601,
602
],
[
602,
603
],
[
603,
604
],
[
603,
605
],
[
601,
606
],
[
606,
607
],
[
606,
608
],
[
601,
609
],
[
609,
610
],
[
610,
611
],
[
601,
612
],
[
613,
613
],
[
613,
614
],
[
614,
615
],
[
615,
616
],
[
615,
617
],
[
614,
618
],
[
618,
619
],
[
619,
620
],
[
618,
621
],
[
596,
622
],
[
622,
623
],
[
594,
624
],
[
624,
625
],
[
141,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
629,
630
],
[
629,
631
],
[
632,
633
],
[
632,
634
],
[
628,
635
],
[
635,
636
],
[
636,
637
],
[
637,
638
],
[
637,
639
],
[
635,
640
],
[
640,
641
],
[
640,
642
],
[
635,
643
],
[
643,
644
],
[
644,
645
],
[
635,
646
],
[
647,
647
],
[
647,
648
],
[
648,
649
],
[
649,
650
],
[
649,
651
],
[
651,
652
],
[
651,
653
],
[
648,
654
],
[
654,
655
],
[
628,
656
],
[
656,
657
],
[
626,
658
],
[
658,
659
],
[
141,
660
],
[
660,
661
],
[
660,
662
],
[
662,
663
],
[
663,
664
],
[
663,
665
],
[
662,
667
],
[
667,
668
],
[
668,
669
],
[
669,
670
],
[
669,
671
],
[
667,
672
],
[
672,
673
],
[
672,
674
],
[
667,
675
],
[
675,
676
],
[
676,
677
],
[
667,
678
],
[
679,
679
],
[
679,
680
],
[
680,
681
],
[
681,
682
],
[
681,
683
],
[
680,
684
],
[
684,
685
],
[
662,
686
],
[
686,
687
],
[
660,
688
],
[
688,
689
],
[
141,
690
],
[
690,
691
],
[
690,
692
],
[
692,
693
],
[
693,
694
],
[
693,
695
],
[
692,
697
],
[
697,
698
],
[
698,
699
],
[
699,
700
],
[
699,
701
],
[
697,
702
],
[
702,
703
],
[
702,
704
],
[
697,
705
],
[
705,
706
],
[
706,
707
],
[
697,
708
],
[
709,
709
],
[
709,
710
],
[
710,
711
],
[
711,
712
],
[
711,
713
],
[
710,
714
],
[
714,
715
],
[
715,
716
],
[
714,
717
],
[
692,
718
],
[
718,
719
],
[
690,
720
],
[
720,
721
],
[
141,
722
],
[
722,
723
],
[
722,
724
],
[
724,
725
],
[
725,
726
],
[
725,
727
],
[
728,
729
],
[
728,
730
],
[
724,
731
],
[
731,
732
],
[
732,
733
],
[
733,
734
],
[
733,
735
],
[
731,
736
],
[
736,
737
],
[
736,
738
],
[
731,
739
],
[
739,
740
],
[
740,
741
],
[
731,
742
],
[
743,
743
],
[
743,
744
],
[
744,
745
],
[
745,
746
],
[
745,
747
],
[
747,
748
],
[
747,
749
],
[
744,
750
],
[
750,
751
],
[
724,
752
],
[
752,
753
],
[
722,
754
],
[
754,
755
],
[
141,
756
],
[
756,
757
],
[
756,
758
],
[
758,
759
],
[
759,
760
],
[
759,
761
],
[
758,
763
],
[
763,
764
],
[
764,
765
],
[
765,
766
],
[
765,
767
],
[
763,
768
],
[
768,
769
],
[
768,
770
],
[
763,
771
],
[
771,
772
],
[
772,
773
],
[
763,
774
],
[
775,
775
],
[
775,
776
],
[
776,
777
],
[
777,
778
],
[
777,
779
],
[
776,
780
],
[
780,
781
],
[
758,
782
],
[
782,
783
],
[
756,
784
],
[
784,
785
],
[
0,
786
],
[
786,
787
],
[
786,
788
]
] |
[
"import java.io.*;\nimport java.util.*;\n\n@SuppressWarnings(\"unused\")\npublic class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"Main",
"FastScanner in;",
"in",
"PrintWriter out;",
"out",
"final static int MOD = (int)1e9+7;",
"MOD",
"(int)1e9+7",
"(int)1e9",
"7",
"void solve(){\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }",
"solve",
"{\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }",
"double A = in.nextDouble()",
"A",
"in.nextDouble()",
"in.nextDouble",
"in",
"B = in.nextDouble();",
"B",
"in.nextDouble()",
"in.nextDouble",
"in",
"int m = in.nextInt() * 60 + in.nextInt();",
"m",
"in.nextInt() * 60 + in.nextInt()",
"in.nextInt() * 60",
"in.nextInt()",
"in.nextInt",
"in",
"60",
"in.nextInt()",
"in.nextInt",
"in",
"double r1 = 2 * Math.PI * m / (12 * 60);",
"r1",
"2 * Math.PI * m / (12 * 60)",
"2 * Math.PI * m",
"2 * Math.PI * m",
"2",
"Math.PI",
"Math",
"Math.PI",
"m",
"(12 * 60)",
"12",
"60",
"double r2 = 2 * Math.PI * (m % 60) / 60;",
"r2",
"2 * Math.PI * (m % 60) / 60",
"2 * Math.PI * (m % 60)",
"2 * Math.PI * (m % 60)",
"2",
"Math.PI",
"Math",
"Math.PI",
"(m % 60)",
"m",
"60",
"60",
"double t = Math.abs(r1 - r2);",
"t",
"Math.abs(r1 - r2)",
"Math.abs",
"Math",
"r1 - r2",
"r1",
"r2",
"t = Math.min(t, 2 * Math.PI - t)",
"t",
"Math.min(t, 2 * Math.PI - t)",
"Math.min",
"Math",
"t",
"2 * Math.PI - t",
"2 * Math.PI",
"2",
"Math.PI",
"Math",
"Math.PI",
"t",
"out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)))",
"out.println",
"out",
"Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t))",
"Math.sqrt",
"Math",
"A * A + B * B - 2 * A * B * Math.cos(t)",
"A * A + B * B",
"A * A",
"A",
"A",
"B * B",
"B",
"B",
"2 * A * B * Math.cos(t)",
"B",
"2 * A * B * Math.cos(t)",
"2",
"A",
"B",
"Math.cos(t)",
"Math.cos",
"Math",
"t",
"public static void main(String[] args) {\n new Main().m();\n }",
"main",
"{\n new Main().m();\n }",
"new Main().m()",
"new Main().m",
"new Main()",
"String[] args",
"args",
"private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }",
"m",
"{\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }",
"in = new FastScanner(System.in)",
"in",
"new FastScanner(System.in)",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"in.close()",
"in.close",
"in",
"out.close()",
"out.close",
"out",
"static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }",
"FastScanner",
"private Reader input;",
"input",
"public FastScanner() {this(System.in);}",
"FastScanner",
"{this(System.in);}",
"this(System.in)",
"this",
"System.in",
"System",
"System.in",
"public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}",
"FastScanner",
"{this.input = new BufferedReader(new InputStreamReader(stream));}",
"this.input = new BufferedReader(new InputStreamReader(stream))",
"this.input",
"this",
"this.input",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"close",
"{\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n this.input.close();\n }",
"this.input.close()",
"this.input.close",
"this.input",
"this",
"this.input",
"public int nextInt() {return (int) nextLong();}",
"nextInt",
"{return (int) nextLong();}",
"return (int) nextLong();",
"(int) nextLong()",
"nextLong",
"public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }",
"nextLong",
"{\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }",
"try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return -1;\n }",
"IOException e",
"{\n e.printStackTrace();\n return -1;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return -1;",
"-1",
"1",
"{\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n }",
"int sign = 1;",
"sign",
"1",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b)",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"b != '-'",
"b",
"'-'",
"b != '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }",
"b == '-'",
"b",
"'-'",
"{\n sign = -1;\n b = input.read();\n }",
"sign = -1",
"sign",
"-1",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '+') {\n b = input.read();\n }",
"b == '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"long ret = b - '0';",
"ret",
"b - '0'",
"b",
"'0'",
"while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }",
"true",
"{\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b < '0' || '9' < b) return ret * sign;",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"return ret * sign;",
"ret * sign",
"ret",
"sign",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }",
"nextDouble",
"{\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }",
"try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }",
"IOException e",
"{\n e.printStackTrace();\n return Double.NaN;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return Double.NaN;",
"Double.NaN",
"Double",
"Double.NaN",
"{\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n }",
"double sign = 1;",
"sign",
"1",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b) && b != '-' && b != '+'",
"(b < '0' || '9' < b)",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"b != '-'",
"b",
"'-'",
"b != '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }",
"b == '-'",
"b",
"'-'",
"{\n sign = -1;\n b = input.read();\n }",
"sign = -1",
"sign",
"-1",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b == '+') {\n b = input.read();\n }",
"b == '+'",
"b",
"'+'",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"double ret = b - '0';",
"ret",
"b - '0'",
"b",
"'0'",
"while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }",
"true",
"{\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"if (b < '0' || '9' < b) break;",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"break;",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"if (b != '.') return sign * ret;",
"b != '.'",
"b",
"'.'",
"return sign * ret;",
"sign * ret",
"sign",
"ret",
"double div = 1;",
"div",
"1",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }",
"ret *= 10",
"ret",
"10",
"ret += b - '0'",
"ret",
"b - '0'",
"b",
"'0'",
"div *= 10",
"div",
"10",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sign * ret / div;",
"sign * ret / div",
"sign * ret",
"sign",
"ret",
"div",
"public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }",
"nextChar",
"{\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }",
"try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }",
"catch (IOException e) {\n e.printStackTrace();\n return 0;\n }",
"IOException e",
"{\n e.printStackTrace();\n return 0;\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return 0;",
"0",
"{\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n }",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (Character.isWhitespace(b)) {\n b = input.read();\n }",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return (char) b;",
"(char) b",
"public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"nextStr",
"{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"IOException e",
"{\n e.printStackTrace();\n return \"\";\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return \"\";",
"\"\"",
"{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (Character.isWhitespace(b)) {\n b = input.read();\n }",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n b = input.read();\n }",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }",
"b != -1 && !Character.isWhitespace(b)",
"b != -1",
"b",
"-1",
"1",
"!Character.isWhitespace(b)",
"Character.isWhitespace(b)",
"Character.isWhitespace",
"Character",
"b",
"{\n sb.append((char) b);\n b = input.read();\n }",
"sb.append((char) b)",
"sb.append",
"sb",
"(char) b",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"nextLine",
"{\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }",
"try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }",
"IOException e",
"{\n e.printStackTrace();\n return \"\";\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"return \"\";",
"\"\"",
"{\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = input.read();",
"b",
"input.read()",
"input.read",
"input",
"while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }",
"b != -1 && b != '\\n'",
"b != -1",
"b",
"-1",
"1",
"b != '\\n'",
"b",
"'\\n'",
"{\n sb.append((char) b);\n b = input.read();\n }",
"sb.append((char) b)",
"sb.append",
"sb",
"(char) b",
"b = input.read()",
"b",
"input.read()",
"input.read",
"input",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"nextIntArray",
"{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt();\n }",
"{\n res[i] = nextInt();\n }",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"int n",
"n",
"public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"nextIntArrayDec",
"{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextInt() - 1;\n }",
"{\n res[i] = nextInt() - 1;\n }",
"res[i] = nextInt() - 1",
"res[i]",
"res",
"i",
"nextInt() - 1",
"nextInt()",
"nextInt",
"1",
"return res;",
"res",
"int n",
"n",
"public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }",
"nextIntArray1Index",
"{\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }",
"int[] res = new int[n + 1];",
"res",
"new int[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i + 1] = nextInt();\n }",
"{\n res[i + 1] = nextInt();\n }",
"res[i + 1] = nextInt()",
"res[i + 1]",
"res",
"i + 1",
"i",
"1",
"nextInt()",
"nextInt",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"nextLongArray",
"{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }",
"long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong();\n }",
"{\n res[i] = nextLong();\n }",
"res[i] = nextLong()",
"res[i]",
"res",
"i",
"nextLong()",
"nextLong",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"nextLongArrayDec",
"{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }",
"long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextLong() - 1;\n }",
"{\n res[i] = nextLong() - 1;\n }",
"res[i] = nextLong() - 1",
"res[i]",
"res",
"i",
"nextLong() - 1",
"nextLong()",
"nextLong",
"1",
"return res;",
"res",
"int n",
"n",
"public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }",
"nextLongArray1Index",
"{\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }",
"long[] res = new long[n + 1];",
"res",
"new long[n + 1]",
"n + 1",
"n",
"1",
"for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i + 1] = nextLong();\n }",
"{\n res[i + 1] = nextLong();\n }",
"res[i + 1] = nextLong()",
"res[i + 1]",
"res",
"i + 1",
"i",
"1",
"nextLong()",
"nextLong",
"return res;",
"res",
"int n",
"n",
"public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"nextDoubleArray",
"{\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }",
"double[] res = new double[n];",
"res",
"new double[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nextDouble();\n }",
"{\n res[i] = nextDouble();\n }",
"res[i] = nextDouble()",
"res[i]",
"res",
"i",
"nextDouble()",
"nextDouble",
"return res;",
"res",
"int n",
"n",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"public class Main {\n FastScanner in;\n PrintWriter out;\n final static int MOD = (int)1e9+7;\n \n void solve(){\n double A = in.nextDouble(), B = in.nextDouble();\n int m = in.nextInt() * 60 + in.nextInt();\n double r1 = 2 * Math.PI * m / (12 * 60);\n double r2 = 2 * Math.PI * (m % 60) / 60;\n double t = Math.abs(r1 - r2);\n t = Math.min(t, 2 * Math.PI - t);\n out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));\n }\n \n public static void main(String[] args) {\n new Main().m();\n }\n \n private void m() {\n in = new FastScanner(System.in);\n out = new PrintWriter(System.out);\n /*\n try {\n String path = \"input.txt\";\n out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));\n }catch (IOException e){\n e.printStackTrace();\n }\n */\n solve();\n out.flush();\n in.close();\n out.close();\n }\n \n static class FastScanner {\n private Reader input;\n \n public FastScanner() {this(System.in);}\n public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}\n public void close() {\n try {\n this.input.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n \n public int nextInt() {return (int) nextLong();}\n \n public long nextLong() {\n try {\n int sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n long ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) return ret * sign;\n ret *= 10;\n ret += b - '0';\n }\n } catch (IOException e) {\n e.printStackTrace();\n return -1;\n }\n }\n \n public double nextDouble() {\n try {\n double sign = 1;\n int b = input.read();\n while ((b < '0' || '9' < b) && b != '-' && b != '+') {\n b = input.read();\n }\n if (b == '-') {\n sign = -1;\n b = input.read();\n } else if (b == '+') {\n b = input.read();\n }\n double ret = b - '0';\n while (true) {\n b = input.read();\n if (b < '0' || '9' < b) break;\n ret *= 10;\n ret += b - '0';\n }\n if (b != '.') return sign * ret;\n double div = 1;\n b = input.read();\n while ('0' <= b && b <= '9') {\n ret *= 10;\n ret += b - '0';\n div *= 10;\n b = input.read();\n }\n return sign * ret / div;\n } catch (IOException e) {\n e.printStackTrace();\n return Double.NaN;\n }\n }\n \n public char nextChar() {\n try {\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n return (char) b;\n } catch (IOException e) {\n e.printStackTrace();\n return 0;\n }\n }\n \n public String nextStr() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (Character.isWhitespace(b)) {\n b = input.read();\n }\n while (b != -1 && !Character.isWhitespace(b)) {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public String nextLine() {\n try {\n StringBuilder sb = new StringBuilder();\n int b = input.read();\n while (b != -1 && b != '\\n') {\n sb.append((char) b);\n b = input.read();\n }\n return sb.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return \"\";\n }\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt();\n }\n return res;\n }\n \n public int[] nextIntArrayDec(int n) {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextInt() - 1;\n }\n return res;\n }\n \n public int[] nextIntArray1Index(int n) {\n int[] res = new int[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextInt();\n }\n return res;\n }\n \n public long[] nextLongArray(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong();\n }\n return res;\n }\n \n public long[] nextLongArrayDec(int n) {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextLong() - 1;\n }\n return res;\n }\n \n public long[] nextLongArray1Index(int n) {\n long[] res = new long[n + 1];\n for (int i = 0; i < n; i++) {\n res[i + 1] = nextLong();\n }\n return res;\n }\n \n public double[] nextDoubleArray(int n) {\n double[] res = new double[n];\n for (int i = 0; i < n; i++) {\n res[i] = nextDouble();\n }\n return res;\n }\n }\n}",
"Main"
] |
import java.io.*;
import java.util.*;
@SuppressWarnings("unused")
public class Main {
FastScanner in;
PrintWriter out;
final static int MOD = (int)1e9+7;
void solve(){
double A = in.nextDouble(), B = in.nextDouble();
int m = in.nextInt() * 60 + in.nextInt();
double r1 = 2 * Math.PI * m / (12 * 60);
double r2 = 2 * Math.PI * (m % 60) / 60;
double t = Math.abs(r1 - r2);
t = Math.min(t, 2 * Math.PI - t);
out.println(Math.sqrt(A * A + B * B - 2 * A * B * Math.cos(t)));
}
public static void main(String[] args) {
new Main().m();
}
private void m() {
in = new FastScanner(System.in);
out = new PrintWriter(System.out);
/*
try {
String path = "input.txt";
out = new PrintWriter(new BufferedWriter(new FileWriter(new File(path))));
}catch (IOException e){
e.printStackTrace();
}
*/
solve();
out.flush();
in.close();
out.close();
}
static class FastScanner {
private Reader input;
public FastScanner() {this(System.in);}
public FastScanner(InputStream stream) {this.input = new BufferedReader(new InputStreamReader(stream));}
public void close() {
try {
this.input.close();
} catch (IOException e) {
e.printStackTrace();
}
}
public int nextInt() {return (int) nextLong();}
public long nextLong() {
try {
int sign = 1;
int b = input.read();
while ((b < '0' || '9' < b) && b != '-' && b != '+') {
b = input.read();
}
if (b == '-') {
sign = -1;
b = input.read();
} else if (b == '+') {
b = input.read();
}
long ret = b - '0';
while (true) {
b = input.read();
if (b < '0' || '9' < b) return ret * sign;
ret *= 10;
ret += b - '0';
}
} catch (IOException e) {
e.printStackTrace();
return -1;
}
}
public double nextDouble() {
try {
double sign = 1;
int b = input.read();
while ((b < '0' || '9' < b) && b != '-' && b != '+') {
b = input.read();
}
if (b == '-') {
sign = -1;
b = input.read();
} else if (b == '+') {
b = input.read();
}
double ret = b - '0';
while (true) {
b = input.read();
if (b < '0' || '9' < b) break;
ret *= 10;
ret += b - '0';
}
if (b != '.') return sign * ret;
double div = 1;
b = input.read();
while ('0' <= b && b <= '9') {
ret *= 10;
ret += b - '0';
div *= 10;
b = input.read();
}
return sign * ret / div;
} catch (IOException e) {
e.printStackTrace();
return Double.NaN;
}
}
public char nextChar() {
try {
int b = input.read();
while (Character.isWhitespace(b)) {
b = input.read();
}
return (char) b;
} catch (IOException e) {
e.printStackTrace();
return 0;
}
}
public String nextStr() {
try {
StringBuilder sb = new StringBuilder();
int b = input.read();
while (Character.isWhitespace(b)) {
b = input.read();
}
while (b != -1 && !Character.isWhitespace(b)) {
sb.append((char) b);
b = input.read();
}
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
return "";
}
}
public String nextLine() {
try {
StringBuilder sb = new StringBuilder();
int b = input.read();
while (b != -1 && b != '\n') {
sb.append((char) b);
b = input.read();
}
return sb.toString();
} catch (IOException e) {
e.printStackTrace();
return "";
}
}
public int[] nextIntArray(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt();
}
return res;
}
public int[] nextIntArrayDec(int n) {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = nextInt() - 1;
}
return res;
}
public int[] nextIntArray1Index(int n) {
int[] res = new int[n + 1];
for (int i = 0; i < n; i++) {
res[i + 1] = nextInt();
}
return res;
}
public long[] nextLongArray(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong();
}
return res;
}
public long[] nextLongArrayDec(int n) {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nextLong() - 1;
}
return res;
}
public long[] nextLongArray1Index(int n) {
long[] res = new long[n + 1];
for (int i = 0; i < n; i++) {
res[i + 1] = nextLong();
}
return res;
}
public double[] nextDoubleArray(int n) {
double[] res = new double[n];
for (int i = 0; i < n; i++) {
res[i] = nextDouble();
}
return res;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
2,
2,
13,
17,
13,
17,
18,
13,
13,
2,
17,
17,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
17,
18,
13,
13,
17,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
36,
42
],
[
36,
43
],
[
43,
44
],
[
43,
45
],
[
34,
46
],
[
46,
47
],
[
46,
48
],
[
8,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
69,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
8,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
8,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
8,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
8,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
111,
113
],
[
8,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
6,
120
],
[
120,
121
]
] |
[
"import java.util.Scanner;\n\nclass Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a_h = sc.nextInt();\n int b_m = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n \n \n double dh = (h*60+m)*2*Math.PI/(12*60) ;\n double hx = a_h*Math.cos(dh) ;\n double hy = a_h*Math.sin(dh) ;\n \n double dm = m*2*Math.PI/60 ;\n double mx = b_m*Math.cos(dm) ;\n double my = b_m*Math.sin(dm) ;\n \n double dx = mx-hx ;\n double dy = my-hy ;\n\n double result = Math.sqrt( dx*dx+dy*dy) ;\n System.out.println(result);\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a_h = sc.nextInt();\n int b_m = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n \n \n double dh = (h*60+m)*2*Math.PI/(12*60) ;\n double hx = a_h*Math.cos(dh) ;\n double hy = a_h*Math.sin(dh) ;\n \n double dm = m*2*Math.PI/60 ;\n double mx = b_m*Math.cos(dm) ;\n double my = b_m*Math.sin(dm) ;\n \n double dx = mx-hx ;\n double dy = my-hy ;\n\n double result = Math.sqrt( dx*dx+dy*dy) ;\n System.out.println(result);\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int a_h = sc.nextInt();\n int b_m = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n \n \n double dh = (h*60+m)*2*Math.PI/(12*60) ;\n double hx = a_h*Math.cos(dh) ;\n double hy = a_h*Math.sin(dh) ;\n \n double dm = m*2*Math.PI/60 ;\n double mx = b_m*Math.cos(dm) ;\n double my = b_m*Math.sin(dm) ;\n \n double dx = mx-hx ;\n double dy = my-hy ;\n\n double result = Math.sqrt( dx*dx+dy*dy) ;\n System.out.println(result);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a_h = sc.nextInt();\n int b_m = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n \n \n double dh = (h*60+m)*2*Math.PI/(12*60) ;\n double hx = a_h*Math.cos(dh) ;\n double hy = a_h*Math.sin(dh) ;\n \n double dm = m*2*Math.PI/60 ;\n double mx = b_m*Math.cos(dm) ;\n double my = b_m*Math.sin(dm) ;\n \n double dx = mx-hx ;\n double dy = my-hy ;\n\n double result = Math.sqrt( dx*dx+dy*dy) ;\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a_h = sc.nextInt();",
"a_h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b_m = sc.nextInt();",
"b_m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double dh = (h*60+m)*2*Math.PI/(12*60) ;",
"dh",
"(h*60+m)*2*Math.PI/(12*60)",
"(h*60+m)*2*Math.PI",
"(h*60+m)*2*Math.PI",
"(h*60+m)",
"h*60",
"h",
"60",
"m",
"2",
"Math.PI",
"Math",
"Math.PI",
"(12*60)",
"12",
"60",
"double hx = a_h*Math.cos(dh) ;",
"hx",
"a_h*Math.cos(dh)",
"a_h",
"Math.cos(dh)",
"Math.cos",
"Math",
"dh",
"double hy = a_h*Math.sin(dh) ;",
"hy",
"a_h*Math.sin(dh)",
"a_h",
"Math.sin(dh)",
"Math.sin",
"Math",
"dh",
"double dm = m*2*Math.PI/60 ;",
"dm",
"m*2*Math.PI/60",
"m*2*Math.PI",
"m*2*Math.PI",
"m",
"2",
"Math.PI",
"Math",
"Math.PI",
"60",
"double mx = b_m*Math.cos(dm) ;",
"mx",
"b_m*Math.cos(dm)",
"b_m",
"Math.cos(dm)",
"Math.cos",
"Math",
"dm",
"double my = b_m*Math.sin(dm) ;",
"my",
"b_m*Math.sin(dm)",
"b_m",
"Math.sin(dm)",
"Math.sin",
"Math",
"dm",
"double dx = mx-hx ;",
"dx",
"mx-hx",
"mx",
"hx",
"double dy = my-hy ;",
"dy",
"my-hy",
"my",
"hy",
"double result = Math.sqrt( dx*dx+dy*dy) ;",
"result",
"Math.sqrt( dx*dx+dy*dy)",
"Math.sqrt",
"Math",
"dx*dx+dy*dy",
"dx*dx",
"dx",
"dx",
"dy*dy",
"dy",
"dy",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a_h = sc.nextInt();
int b_m = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double dh = (h*60+m)*2*Math.PI/(12*60) ;
double hx = a_h*Math.cos(dh) ;
double hy = a_h*Math.sin(dh) ;
double dm = m*2*Math.PI/60 ;
double mx = b_m*Math.cos(dm) ;
double my = b_m*Math.sin(dm) ;
double dx = mx-hx ;
double dy = my-hy ;
double result = Math.sqrt( dx*dx+dy*dy) ;
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
0,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
2,
2,
13,
18,
13,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
117,
5
],
[
117,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
50,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
8,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
8,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
6,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = Integer.parseInt(sc.next());",
"A",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int B = Integer.parseInt(sc.next());",
"B",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int H = Integer.parseInt(sc.next());",
"H",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int M = Integer.parseInt(sc.next());",
"M",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"double Hdeg = H * 30 + M * 0.5;",
"Hdeg",
"H * 30 + M * 0.5",
"H * 30",
"H",
"30",
"M * 0.5",
"M",
"0.5",
"double Mdeg = M * 6;",
"Mdeg",
"M * 6",
"M",
"6",
"double deg = Hdeg - Mdeg;",
"deg",
"Hdeg - Mdeg",
"Hdeg",
"Mdeg",
"if (deg > 180) {\n deg = 360 - deg;\n }",
"deg > 180",
"deg",
"180",
"{\n deg = 360 - deg;\n }",
"deg = 360 - deg",
"deg",
"360 - deg",
"360",
"deg",
"deg = Math.abs(deg)",
"deg",
"Math.abs(deg)",
"Math.abs",
"Math",
"deg",
"double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));",
"cSquare",
"A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180))",
"A * A + B * B",
"A * A",
"A",
"A",
"B * B",
"B",
"B",
"(2 * A * B * Math.cos(deg * Math.PI / 180))",
"B",
"2 * A * B * Math.cos(deg * Math.PI / 180)",
"2",
"A",
"B",
"Math.cos(deg * Math.PI / 180)",
"Math.cos",
"Math",
"deg * Math.PI / 180",
"deg * Math.PI",
"deg",
"Math.PI",
"Math",
"Math.PI",
"180",
"System.out.println(Math.sqrt(cSquare))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(cSquare)",
"Math.sqrt",
"Math",
"cSquare",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n double Hdeg = H * 30 + M * 0.5;\n double Mdeg = M * 6;\n\n double deg = Hdeg - Mdeg;\n if (deg > 180) {\n deg = 360 - deg;\n }\n deg = Math.abs(deg);\n\n double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));\n System.out.println(Math.sqrt(cSquare));\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = Integer.parseInt(sc.next());
int B = Integer.parseInt(sc.next());
int H = Integer.parseInt(sc.next());
int M = Integer.parseInt(sc.next());
double Hdeg = H * 30 + M * 0.5;
double Mdeg = M * 6;
double deg = Hdeg - Mdeg;
if (deg > 180) {
deg = 360 - deg;
}
deg = Math.abs(deg);
double cSquare = A * A + B * B - (2 * A * B * Math.cos(deg * Math.PI / 180));
System.out.println(Math.sqrt(cSquare));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
2,
13,
17,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
13,
17,
17,
41,
13,
4,
18,
13,
2,
13,
13,
4,
18,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
248,
20
],
[
248,
21
],
[
21,
22
],
[
248,
23
],
[
23,
24
],
[
248,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
27,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
27,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
27,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
27,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
27,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
27,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
27,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
27,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
27,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
97,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
27,
108
],
[
108,
109
],
[
109,
110
],
[
25,
111
],
[
111,
112
],
[
248,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
113,
117
],
[
117,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
113,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
128,
137
],
[
137,
138
],
[
137,
139
],
[
127,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
113,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
151,
152
],
[
113,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
160,
161
],
[
113,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
166,
169
],
[
169,
170
],
[
113,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
175,
179
],
[
113,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
192,
193
],
[
192,
194
],
[
187,
195
],
[
195,
196
],
[
196,
197
],
[
187,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
199,
203
],
[
203,
204
],
[
182,
205
],
[
205,
206
],
[
180,
207
],
[
207,
208
],
[
113,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
218,
220
],
[
216,
221
],
[
221,
222
],
[
221,
223
],
[
216,
224
],
[
224,
225
],
[
225,
226
],
[
216,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
232,
233
],
[
211,
234
],
[
234,
235
],
[
209,
236
],
[
236,
237
],
[
113,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
0,
247
],
[
247,
248
],
[
247,
249
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.OutputStreamWriter;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main {\n static PrintWriter out;\n static CF_Reader in;\n\n public static void main(String[] args) throws IOException {\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }\n\n\n static class CF_Reader {\n BufferedReader br;\n StringTokenizer st;\n\n public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n\n long longNext() throws IOException {\n return Long.parseLong(next());\n }\n\n int intNext() throws IOException {\n return Integer.parseInt(next());\n }\n\n double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }\n\n char charNext() throws IOException {\n return next().charAt(0);\n }\n\n public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }\n\n public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }\n\n String line() throws IOException {\n return br.readLine().trim();\n }\n }\n}\n\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n static PrintWriter out;\n static CF_Reader in;\n\n public static void main(String[] args) throws IOException {\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }\n\n\n static class CF_Reader {\n BufferedReader br;\n StringTokenizer st;\n\n public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n\n long longNext() throws IOException {\n return Long.parseLong(next());\n }\n\n int intNext() throws IOException {\n return Integer.parseInt(next());\n }\n\n double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }\n\n char charNext() throws IOException {\n return next().charAt(0);\n }\n\n public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }\n\n public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }\n\n String line() throws IOException {\n return br.readLine().trim();\n }\n }\n}",
"Main",
"static PrintWriter out;",
"out",
"static CF_Reader in;",
"in",
"public static void main(String[] args) throws IOException {\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }",
"main",
"{\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }",
"out = new PrintWriter(new OutputStreamWriter(System.out))",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"in = new CF_Reader()",
"in",
"new CF_Reader()",
"double x = in.doubleNext();",
"x",
"in.doubleNext()",
"in.doubleNext",
"in",
"double y = in.doubleNext();",
"y",
"in.doubleNext()",
"in.doubleNext",
"in",
"double hour = in.doubleNext();",
"hour",
"in.doubleNext()",
"in.doubleNext",
"in",
"double mins = in.doubleNext();",
"mins",
"in.doubleNext()",
"in.doubleNext",
"in",
"hour += (mins) / 60",
"hour",
"(mins) / 60",
"(mins)",
"60",
"double hourAngle = (hour * 360) / 12;",
"hourAngle",
"(hour * 360) / 12",
"(hour * 360)",
"hour",
"360",
"12",
"double minAngle = (mins * 360) / 60;",
"minAngle",
"(mins * 360) / 60",
"(mins * 360)",
"mins",
"360",
"60",
"double angle = Math.abs(hourAngle - minAngle);",
"angle",
"Math.abs(hourAngle - minAngle)",
"Math.abs",
"Math",
"hourAngle - minAngle",
"hourAngle",
"minAngle",
"out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))))",
"out.println",
"out",
"Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle)))",
"Math.sqrt",
"Math",
"x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))",
"x * x + y * y",
"x * x",
"x",
"x",
"y * y",
"y",
"y",
"2 * x * y * Math.cos(Math.toRadians(angle))",
"y",
"2 * x * y * Math.cos(Math.toRadians(angle))",
"2",
"x",
"y",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class CF_Reader {\n BufferedReader br;\n StringTokenizer st;\n\n public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n\n long longNext() throws IOException {\n return Long.parseLong(next());\n }\n\n int intNext() throws IOException {\n return Integer.parseInt(next());\n }\n\n double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }\n\n char charNext() throws IOException {\n return next().charAt(0);\n }\n\n public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }\n\n public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }\n\n String line() throws IOException {\n return br.readLine().trim();\n }\n }",
"CF_Reader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"CF_Reader",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine().trim())",
"st",
"new StringTokenizer(br.readLine().trim())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"long longNext() throws IOException {\n return Long.parseLong(next());\n }",
"longNext",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"int intNext() throws IOException {\n return Integer.parseInt(next());\n }",
"intNext",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }",
"doubleNext",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"char charNext() throws IOException {\n return next().charAt(0);\n }",
"charNext",
"{\n return next().charAt(0);\n }",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }",
"nextIntArray",
"{\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }",
"final int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = intNext();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = intNext();",
"a[i] = intNext()",
"a[i]",
"a",
"i",
"intNext()",
"intNext",
"return a;",
"a",
"final int n",
"n",
"public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }",
"nextLongArray",
"{\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }",
"final long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = longNext();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = longNext();",
"a[i] = longNext()",
"a[i]",
"a",
"i",
"longNext()",
"longNext",
"return a;",
"a",
"final int n",
"n",
"String line() throws IOException {\n return br.readLine().trim();\n }",
"line",
"{\n return br.readLine().trim();\n }",
"return br.readLine().trim();",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"public class Main {\n static PrintWriter out;\n static CF_Reader in;\n\n public static void main(String[] args) throws IOException {\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }\n\n\n static class CF_Reader {\n BufferedReader br;\n StringTokenizer st;\n\n public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n\n long longNext() throws IOException {\n return Long.parseLong(next());\n }\n\n int intNext() throws IOException {\n return Integer.parseInt(next());\n }\n\n double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }\n\n char charNext() throws IOException {\n return next().charAt(0);\n }\n\n public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }\n\n public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }\n\n String line() throws IOException {\n return br.readLine().trim();\n }\n }\n}",
"public class Main {\n static PrintWriter out;\n static CF_Reader in;\n\n public static void main(String[] args) throws IOException {\n out = new PrintWriter(new OutputStreamWriter(System.out));\n in = new CF_Reader();\n\n double x = in.doubleNext();\n double y = in.doubleNext();\n double hour = in.doubleNext();\n double mins = in.doubleNext();\n hour += (mins) / 60;\n\n double hourAngle = (hour * 360) / 12;\n double minAngle = (mins * 360) / 60;\n\n double angle = Math.abs(hourAngle - minAngle);\n out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));\n\n out.close();\n }\n\n\n static class CF_Reader {\n BufferedReader br;\n StringTokenizer st;\n\n public CF_Reader() throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n\n long longNext() throws IOException {\n return Long.parseLong(next());\n }\n\n int intNext() throws IOException {\n return Integer.parseInt(next());\n }\n\n double doubleNext() throws IOException {\n return Double.parseDouble(next());\n }\n\n char charNext() throws IOException {\n return next().charAt(0);\n }\n\n public int[] nextIntArray(final int n) throws IOException {\n final int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = intNext();\n return a;\n }\n\n public long[] nextLongArray(final int n) throws IOException {\n final long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = longNext();\n return a;\n }\n\n String line() throws IOException {\n return br.readLine().trim();\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main {
static PrintWriter out;
static CF_Reader in;
public static void main(String[] args) throws IOException {
out = new PrintWriter(new OutputStreamWriter(System.out));
in = new CF_Reader();
double x = in.doubleNext();
double y = in.doubleNext();
double hour = in.doubleNext();
double mins = in.doubleNext();
hour += (mins) / 60;
double hourAngle = (hour * 360) / 12;
double minAngle = (mins * 360) / 60;
double angle = Math.abs(hourAngle - minAngle);
out.println(Math.sqrt(x * x + y * y - 2 * x * y * Math.cos(Math.toRadians(angle))));
out.close();
}
static class CF_Reader {
BufferedReader br;
StringTokenizer st;
public CF_Reader() throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
long longNext() throws IOException {
return Long.parseLong(next());
}
int intNext() throws IOException {
return Integer.parseInt(next());
}
double doubleNext() throws IOException {
return Double.parseDouble(next());
}
char charNext() throws IOException {
return next().charAt(0);
}
public int[] nextIntArray(final int n) throws IOException {
final int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = intNext();
return a;
}
public long[] nextLongArray(final int n) throws IOException {
final long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = longNext();
return a;
}
String line() throws IOException {
return br.readLine().trim();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
91,
8
],
[
91,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
11,
41
],
[
41,
42
],
[
41,
43
],
[
11,
44
],
[
44,
45
],
[
44,
46
],
[
11,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
11,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
11,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
11,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
11,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
86,
87
],
[
9,
88
],
[
88,
89
],
[
0,
90
],
[
90,
91
],
[
90,
92
]
] |
[
"import java.math.BigDecimal;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }\n}",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int a = scanner.nextInt();",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int b = scanner.nextInt();",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int h = scanner.nextInt();",
"h",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int m = scanner.nextInt();",
"m",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));",
"hourY",
"new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)))",
"BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));",
"hourX",
"new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)))",
"BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));",
"minuteY",
"new BigDecimal(b * Math.sin(Math.toRadians(6 * m)))",
"BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));",
"minuteX",
"new BigDecimal(b * Math.cos(Math.toRadians(6 * m)))",
"BigDecimal x = hourX.subtract(minuteX);",
"x",
"hourX.subtract(minuteX)",
"hourX.subtract",
"hourX",
"minuteX",
"BigDecimal y = hourY.subtract(minuteY);",
"y",
"hourY.subtract(minuteY)",
"hourY.subtract",
"hourY",
"minuteY",
"BigDecimal xx = x.multiply(x);",
"xx",
"x.multiply(x)",
"x.multiply",
"x",
"x",
"BigDecimal yy = y.multiply(y);",
"yy",
"y.multiply(y)",
"y.multiply",
"y",
"y",
"BigDecimal preResult = xx.add(yy);",
"preResult",
"xx.add(yy)",
"xx.add",
"xx",
"yy",
"System.out.println(Math.sqrt(preResult.doubleValue()))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(preResult.doubleValue())",
"Math.sqrt",
"Math",
"preResult.doubleValue()",
"preResult.doubleValue",
"preResult",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n\n int a = scanner.nextInt();\n int b = scanner.nextInt();\n int h = scanner.nextInt();\n int m = scanner.nextInt();\n BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));\n BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));\n BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));\n BigDecimal x = hourX.subtract(minuteX);\n BigDecimal y = hourY.subtract(minuteY);\n BigDecimal xx = x.multiply(x);\n BigDecimal yy = y.multiply(y);\n BigDecimal preResult = xx.add(yy);\n System.out.println(Math.sqrt(preResult.doubleValue()));\n\n\n\n }\n}",
"Main"
] |
import java.math.BigDecimal;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int h = scanner.nextInt();
int m = scanner.nextInt();
BigDecimal hourY =new BigDecimal(a * Math.sin(Math.toRadians((double)((60 * h) + m) * 0.5)));
BigDecimal hourX = new BigDecimal(a * Math.cos(Math.toRadians((double)((60 * h) + m) * 0.5)));
BigDecimal minuteY = new BigDecimal(b * Math.sin(Math.toRadians(6 * m)));
BigDecimal minuteX = new BigDecimal(b * Math.cos(Math.toRadians(6 * m)));
BigDecimal x = hourX.subtract(minuteX);
BigDecimal y = hourY.subtract(minuteY);
BigDecimal xx = x.multiply(x);
BigDecimal yy = y.multiply(y);
BigDecimal preResult = xx.add(yy);
System.out.println(Math.sqrt(preResult.doubleValue()));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
13,
41,
13,
2,
2,
17,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
2,
13,
13,
30,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
0,
13,
2,
2,
13,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
13,
0,
13,
2,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
149,
5
],
[
149,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
8,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
62,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
57,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
74,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
88,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
88,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
112,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
125,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
88,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
88,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
139,
145
],
[
6,
146
],
[
146,
147
],
[
0,
148
],
[
148,
149
],
[
148,
150
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextDouble();",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m = sc.nextDouble();",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m1 = 6 * m;",
"m1",
"6 * m",
"6",
"m",
"double h1 = 30 * h + 0.5 * m;",
"h1",
"30 * h + 0.5 * m",
"30 * h",
"30",
"h",
"0.5 * m",
"0.5",
"m",
"double rc = Math.abs(m1 - h1);",
"rc",
"Math.abs(m1 - h1)",
"Math.abs",
"Math",
"m1 - h1",
"m1",
"h1",
"double c = 0;",
"c",
"0",
"if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }",
"rc == 0",
"rc",
"0",
"{\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }",
"System.out.printf(\"%.20f\", Math.abs(a - b))",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"Math.abs(a - b)",
"Math.abs",
"Math",
"a - b",
"a",
"b",
"if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }",
"rc == 180",
"rc",
"180",
"{\n System.out.printf(\"%.20f\", a + b);\n }",
"System.out.printf(\"%.20f\", a + b)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"a + b",
"a",
"b",
"{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }",
"if(rc > 180){\n rc = 360 - rc;\n }",
"rc > 180",
"rc",
"180",
"{\n rc = 360 - rc;\n }",
"rc = 360 - rc",
"rc",
"360 - rc",
"360",
"rc",
"c = a * a + b * b",
"c",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }",
"rc != 90",
"rc",
"90",
"{\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }",
"rc = Math.toRadians(rc)",
"rc",
"Math.toRadians(rc)",
"Math.toRadians",
"Math",
"rc",
"c = c - 2 * a * b * Math.cos(rc)",
"c",
"c - 2 * a * b * Math.cos(rc)",
"c",
"2 * a * b * Math.cos(rc)",
"b",
"2 * a * b * Math.cos(rc)",
"2",
"a",
"b",
"Math.cos(rc)",
"Math.cos",
"Math",
"rc",
"c = Math.sqrt(c)",
"c",
"Math.sqrt(c)",
"Math.sqrt",
"Math",
"c",
"System.out.printf(\"%.20f\",c)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n double h = sc.nextDouble();\n double m = sc.nextDouble();\n\n double m1 = 6 * m;\n double h1 = 30 * h + 0.5 * m;\n double rc = Math.abs(m1 - h1);\n double c = 0;\n if (rc == 0) {\n System.out.printf(\"%.20f\", Math.abs(a - b));\n }else if (rc == 180){\n System.out.printf(\"%.20f\", a + b);\n }else{\n if(rc > 180){\n rc = 360 - rc;\n }\n c = a * a + b * b;\n if(rc != 90){\n rc = Math.toRadians(rc);\n c = c - 2 * a * b * Math.cos(rc);\n }\n c = Math.sqrt(c);\n System.out.printf(\"%.20f\",c);\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
double m1 = 6 * m;
double h1 = 30 * h + 0.5 * m;
double rc = Math.abs(m1 - h1);
double c = 0;
if (rc == 0) {
System.out.printf("%.20f", Math.abs(a - b));
}else if (rc == 180){
System.out.printf("%.20f", a + b);
}else{
if(rc > 180){
rc = 360 - rc;
}
c = a * a + b * b;
if(rc != 90){
rc = Math.toRadians(rc);
c = c - 2 * a * b * Math.cos(rc);
}
c = Math.sqrt(c);
System.out.printf("%.20f",c);
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
2,
17,
13,
2,
17,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
11,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
48,
50
],
[
11,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
66,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
11,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
9,
83
],
[
83,
84
]
] |
[
"import java.util.Scanner;\nimport java.math.*;\n \nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n sc.close();\n \n //短針と長針のなす角(度数)\n double degree = (30*h + 0.5*m) - 6*m;\n \n double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));\n \n System.out.println(distance);\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.math.*;",
"math.*",
"java",
"class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n sc.close();\n \n //短針と長針のなす角(度数)\n double degree = (30*h + 0.5*m) - 6*m;\n \n double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));\n \n System.out.println(distance);\n } \n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n \n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n sc.close();\n \n //短針と長針のなす角(度数)\n double degree = (30*h + 0.5*m) - 6*m;\n \n double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));\n \n System.out.println(distance);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n sc.close();\n \n //短針と長針のなす角(度数)\n double degree = (30*h + 0.5*m) - 6*m;\n \n double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));\n \n System.out.println(distance);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"double degree = (30*h + 0.5*m) - 6*m;",
"degree",
"(30*h + 0.5*m) - 6*m",
"(30*h + 0.5*m)",
"30*h",
"30",
"h",
"0.5*m",
"0.5",
"m",
"6*m",
"6",
"m",
"double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));",
"distance",
"Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)))",
"Math.sqrt",
"Math",
"a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree))",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b*Math.cos(Math.toRadians(degree))",
"b",
"2*a*b*Math.cos(Math.toRadians(degree))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(degree))",
"Math.cos",
"Math",
"Math.toRadians(degree)",
"Math.toRadians",
"Math",
"degree",
"System.out.println(distance)",
"System.out.println",
"System.out",
"System",
"System.out",
"distance",
"String args[]",
"args"
] |
import java.util.Scanner;
import java.math.*;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
sc.close();
//短針と長針のなす角(度数)
double degree = (30*h + 0.5*m) - 6*m;
double distance = Math.sqrt(a*a + b*b -2*a*b*Math.cos(Math.toRadians(degree)));
System.out.println(distance);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
2,
2,
17,
13,
2,
2,
17,
13,
17,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
4,
13,
40,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
114,
14
],
[
114,
15
],
[
15,
16
],
[
15,
17
],
[
114,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
20,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
20,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
20,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
20,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
79,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
20,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
114,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
96,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] |
[
"/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\nimport java.text.DecimalFormat;\n\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.text.DecimalFormat;",
"DecimalFormat",
"java.text",
"public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"Main",
"static Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"public static void solve()\n {\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }",
"solve",
"{\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }",
"DecimalFormat df = new DecimalFormat(\"#.####################\");",
"df",
"new DecimalFormat(\"#.####################\")",
"double a=in.nextDouble()",
"a",
"in.nextDouble()",
"in.nextDouble",
"in",
"b=in.nextDouble();",
"b",
"in.nextDouble()",
"in.nextDouble",
"in",
"double h=in.nextDouble()",
"h",
"in.nextDouble()",
"in.nextDouble",
"in",
"m=in.nextDouble();",
"m",
"in.nextDouble()",
"in.nextDouble",
"in",
"double angle=Math.abs(30*h - 11*m/2.0);",
"angle",
"Math.abs(30*h - 11*m/2.0)",
"Math.abs",
"Math",
"30*h - 11*m/2.0",
"30*h",
"30",
"h",
"11*m/2.0",
"11*m",
"11",
"m",
"2.0",
"double ans=Math.toRadians(angle);",
"ans",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));",
"c",
"Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans))",
"Math.sqrt",
"Math",
"a*a + b*b - 2.0*a*b*Math.cos(ans)",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2.0*a*b*Math.cos(ans)",
"b",
"2.0*a*b*Math.cos(ans)",
"2.0",
"a",
"b",
"Math.cos(ans)",
"Math.cos",
"Math",
"ans",
"System.out.println(df.format(c))",
"System.out.println",
"System.out",
"System",
"System.out",
"df.format(c)",
"df.format",
"df",
"c",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}",
"main",
"{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}",
"int t=1;",
"t",
"1",
"while(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}",
"t>0",
"t",
"0",
"{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}",
"solve()",
"solve",
"t--",
"t",
"String[] args",
"args",
"public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"public class Main\n \n \n{\n static Scanner in = new Scanner(System.in);\n \n public static void solve()\n {\n DecimalFormat df = new DecimalFormat(\"#.####################\");\n double a=in.nextDouble(),b=in.nextDouble();\n double h=in.nextDouble(),m=in.nextDouble();\n \n \n double angle=Math.abs(30*h - 11*m/2.0);\n \n double ans=Math.toRadians(angle);\n // System.out.println(ans);\n \n double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));\n \n System.out.println(df.format(c));\n \n }\n \n\n \n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\t\n\t\tint t=1;\n\t\t//in.nextLine();\n\t\t\n\t\twhile(t>0)\n\t\t{\n\t\t \n\t\t solve();\n\t\t t--;\n\t\t}\n\t\t\n\t\t\n\t\n\t//\tSystem.out.println(x);\n\t}\n}",
"Main"
] |
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.DecimalFormat;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
static Scanner in = new Scanner(System.in);
public static void solve()
{
DecimalFormat df = new DecimalFormat("#.####################");
double a=in.nextDouble(),b=in.nextDouble();
double h=in.nextDouble(),m=in.nextDouble();
double angle=Math.abs(30*h - 11*m/2.0);
double ans=Math.toRadians(angle);
// System.out.println(ans);
double c= Math.sqrt(a*a + b*b - 2.0*a*b*Math.cos(ans));
System.out.println(df.format(c));
}
public static void main (String[] args) throws java.lang.Exception
{
// your code goes here
int t=1;
//in.nextLine();
while(t>0)
{
solve();
t--;
}
// System.out.println(x);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
2,
17,
17,
2,
13,
17,
41,
13,
2,
13,
2,
17,
17,
41,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
94,
5
],
[
94,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
8,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
80,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
6,
91
],
[
91,
92
],
[
0,
93
],
[
93,
94
],
[
93,
95
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }",
"main",
"{\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }",
"Scanner scn=new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int a=scn.nextInt();",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int b=scn.nextInt();",
"b",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int h=scn.nextInt();",
"h",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int m=scn.nextInt();",
"m",
"scn.nextInt()",
"scn.nextInt",
"scn",
"double a_angle=h*(360/12)+m*0.5;",
"a_angle",
"h*(360/12)+m*0.5",
"h*(360/12)",
"h",
"(360/12)",
"360",
"12",
"m*0.5",
"m",
"0.5",
"double b_angle=m*(360/60);",
"b_angle",
"m*(360/60)",
"m",
"(360/60)",
"360",
"60",
"double c=a_angle-b_angle;",
"c",
"a_angle-b_angle",
"a_angle",
"b_angle",
"if(c<0) c+=360;",
"c<0",
"c",
"0",
"c+=360",
"c",
"360",
"System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c)))",
"Math.sqrt",
"Math",
"a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))",
"a*a+b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b*Math.cos(Math.toRadians(c))",
"b",
"2*a*b*Math.cos(Math.toRadians(c))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(c))",
"Math.cos",
"Math",
"Math.toRadians(c)",
"Math.toRadians",
"Math",
"c",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner scn=new Scanner(System.in);\n int a=scn.nextInt();\n int b=scn.nextInt();\n int h=scn.nextInt();\n int m=scn.nextInt();\n double a_angle=h*(360/12)+m*0.5;\n double b_angle=m*(360/60);\n double c=a_angle-b_angle;\n if(c<0) c+=360;\n \n System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scn=new Scanner(System.in);
int a=scn.nextInt();
int b=scn.nextInt();
int h=scn.nextInt();
int m=scn.nextInt();
double a_angle=h*(360/12)+m*0.5;
double b_angle=m*(360/60);
double c=a_angle-b_angle;
if(c<0) c+=360;
System.out.println(Math.sqrt(a*a+b*b-2*a*b*Math.cos(Math.toRadians(c))));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
18,
13,
13,
41,
13,
2,
2,
2,
2,
2,
13,
17,
13,
17,
17,
13,
41,
13,
2,
2,
2,
13,
17,
17,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
40,
48
],
[
40,
49
],
[
8,
50
],
[
50,
51
],
[
50,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
53,
58
],
[
8,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
8,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
8,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
8,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
8,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
8,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
8,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
110,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
113,
119
],
[
6,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
] |
[
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextDouble();",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m = sc.nextDouble();",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"final double PI = Math.PI;",
"PI",
"Math.PI",
"Math",
"Math.PI",
"double ht = ((h*60+m)/720 )*2*PI;",
"ht",
"((h*60+m)/720 )*2*PI",
"((h*60+m)/720 )*2*PI",
"((h*60+m)/720 )",
"(h*60+m)",
"h*60",
"h",
"60",
"m",
"720",
"2",
"PI",
"double mt = (m/60)*2*PI;",
"mt",
"(m/60)*2*PI",
"(m/60)*2*PI",
"(m/60)",
"m",
"60",
"2",
"PI",
"double hx = a*Math.cos(ht);",
"hx",
"a*Math.cos(ht)",
"a",
"Math.cos(ht)",
"Math.cos",
"Math",
"ht",
"double hy = a*Math.sin(ht);",
"hy",
"a*Math.sin(ht)",
"a",
"Math.sin(ht)",
"Math.sin",
"Math",
"ht",
"double mx = b*Math.cos(mt);",
"mx",
"b*Math.cos(mt)",
"b",
"Math.cos(mt)",
"Math.cos",
"Math",
"mt",
"double my = b*Math.sin(mt);",
"my",
"b*Math.sin(mt)",
"b",
"Math.sin(mt)",
"Math.sin",
"Math",
"mt",
"double dx = hx-mx;",
"dx",
"hx-mx",
"hx",
"mx",
"double dy = hy-my;",
"dy",
"hy-my",
"hy",
"my",
"double ans = Math.sqrt(dx*dx+dy*dy);",
"ans",
"Math.sqrt(dx*dx+dy*dy)",
"Math.sqrt",
"Math",
"dx*dx+dy*dy",
"dx*dx",
"dx",
"dx",
"dy*dy",
"dy",
"dy",
"System.out.printf(\"%.10f\", ans)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.10f\"",
"ans",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\tfinal double PI = Math.PI;\n\t\tdouble ht = ((h*60+m)/720 )*2*PI;\n\t\tdouble mt = (m/60)*2*PI;\n\t\tdouble hx = a*Math.cos(ht);\n\t\tdouble hy = a*Math.sin(ht);\n\t\tdouble mx = b*Math.cos(mt);\n\t\tdouble my = b*Math.sin(mt);\n\t\t\n\t\tdouble dx = hx-mx;\n\t\tdouble dy = hy-my;\n\n\t\tdouble ans = Math.sqrt(dx*dx+dy*dy);\n\t\tSystem.out.printf(\"%.10f\", ans);\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
final double PI = Math.PI;
double ht = ((h*60+m)/720 )*2*PI;
double mt = (m/60)*2*PI;
double hx = a*Math.cos(ht);
double hy = a*Math.sin(ht);
double mx = b*Math.cos(mt);
double my = b*Math.sin(mt);
double dx = hx-mx;
double dy = hy-my;
double ans = Math.sqrt(dx*dx+dy*dy);
System.out.printf("%.10f", ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
17,
2,
2,
13,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
2,
17,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
2,
2,
13,
17,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
2,
13,
17,
0,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
268,
20
],
[
268,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
31,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
31,
48
],
[
48,
49
],
[
48,
50
],
[
23,
51
],
[
51,
52
],
[
21,
53
],
[
53,
54
],
[
21,
55
],
[
55,
56
],
[
268,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
59,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
59,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
59,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
84,
90
],
[
59,
91
],
[
91,
92
],
[
57,
93
],
[
93,
94
],
[
57,
95
],
[
95,
96
],
[
268,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
99,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
99,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
99,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
99,
123
],
[
123,
124
],
[
123,
125
],
[
99,
126
],
[
126,
127
],
[
126,
128
],
[
99,
129
],
[
129,
130
],
[
129,
131
],
[
132,
132
],
[
132,
133
],
[
132,
134
],
[
132,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
135,
145
],
[
145,
146
],
[
145,
147
],
[
99,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
155
],
[
155,
156
],
[
155,
157
],
[
150,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
158,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
99,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
168,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
97,
177
],
[
177,
178
],
[
268,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
179,
183
],
[
183,
184
],
[
179,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
179,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
194,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
204,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
193,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
179,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
226,
227
],
[
179,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
232,
235
],
[
235,
236
],
[
179,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
241,
244
],
[
244,
245
],
[
179,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
252,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
263,
264
],
[
248,
265
],
[
265,
266
],
[
0,
267
],
[
267,
268
],
[
267,
269
]
] |
[
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigDecimal;\nimport java.math.MathContext;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tstatic int calcAngle(int h, int m) {\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.MathContext;",
"MathContext",
"java.math",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tstatic int calcAngle(int h, int m) {\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"Main",
"static long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}",
"expo",
"{\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}",
"long t = 1L;",
"t",
"1L",
"while (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}",
"exp > 0",
"exp",
"0",
"{\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}",
"if (exp % 2 != 0)\n\t\t\t\tt = (t * base);",
"exp % 2 != 0",
"exp % 2",
"exp",
"2",
"0",
"t = (t * base)",
"t",
"(t * base)",
"t",
"base",
"base = (base * base)",
"base",
"(base * base)",
"base",
"base",
"exp /= 2",
"exp",
"2",
"return t;",
"t",
"long base",
"base",
"long exp",
"exp",
"static int calcAngle(int h, int m) {\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}",
"calcAngle",
"{\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}",
"int hour_angle = (int) (0.5 * (h * 60 + m));",
"hour_angle",
"(int) (0.5 * (h * 60 + m))",
"0.5",
"(h * 60 + m)",
"h * 60",
"h",
"60",
"m",
"int minute_angle = (int) (6 * m);",
"minute_angle",
"(int) (6 * m)",
"6",
"m",
"int angle = Math.abs(hour_angle - minute_angle);",
"angle",
"Math.abs(hour_angle - minute_angle)",
"Math.abs",
"Math",
"hour_angle - minute_angle",
"hour_angle",
"minute_angle",
"angle = Math.min(360 - angle, angle)",
"angle",
"Math.min(360 - angle, angle)",
"Math.min",
"Math",
"360 - angle",
"360",
"angle",
"angle",
"return angle;",
"angle",
"int h",
"h",
"int m",
"m",
"public static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"main",
"{\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"MyScanner sc = new MyScanner();",
"sc",
"new MyScanner()",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double ans = 0.0;",
"ans",
"0.0",
"double pi = 3.14159265358979323846264338327950;",
"pi",
"3.14159265358979323846264338327950",
"double rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);",
"rad",
"pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0)",
"pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0)",
"pi",
"2",
"((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0)",
"(double)h / 12.0 + ((double)m / 60.0) / 12.0",
"(double)h / 12.0",
"(double)h",
"12.0",
"((double)m / 60.0) / 12.0",
"((double)m / 60.0)",
"(double)m",
"60.0",
"12.0",
"(double)m / 60.0",
"(double)m",
"60.0",
"ans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad))",
"ans",
"(double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad))",
"(double)((long)(a * a) + (long)(b * b))",
"(long)(a * a)",
"a",
"a",
"(long)(b * b)",
"b",
"b",
"(double)((2.0 * a * b) * Math.cos(rad))",
"(2.0 * a * b)",
"2.0 * a * b",
"2.0",
"a",
"b",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String args[]",
"args",
"public static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"MyScanner",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"nextLine",
"{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\tstr = br.readLine();\n\t\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tstatic int calcAngle(int h, int m) {\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"public class Main {\n\n\tstatic long expo(long base, long exp) {\n\t\tlong t = 1L;\n\t\twhile (exp > 0) {\n\t\t\tif (exp % 2 != 0)\n\t\t\t\tt = (t * base);\n\n\t\t\tbase = (base * base);\n\t\t\texp /= 2;\n\t\t}\n\t\treturn t;\n\t}\n\n\tstatic int calcAngle(int h, int m) {\n\n\t\tint hour_angle = (int) (0.5 * (h * 60 + m));\n\t\tint minute_angle = (int) (6 * m);\n\n\t\tint angle = Math.abs(hour_angle - minute_angle);\n\n\t\tangle = Math.min(360 - angle, angle);\n\n\t\treturn angle;\n\t}\n\n\tpublic static void main(String args[]) throws Exception {\n\t\tMyScanner sc = new MyScanner();\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble ans = 0.0;\n\t\tdouble pi = 3.14159265358979323846264338327950;\n\t\t//int angle = calcAngle(h, m);\n\t\t\n\t\tdouble rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);\n\t\t\n\t\t\n\t\tans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));\n\t\t/*BigDecimal br = new BigDecimal(Double.toString(ans));\n\t\tbr = br.sqrt(new MathContext(20));*/\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n\n\tpublic static class MyScanner {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic MyScanner() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.MathContext;
import java.util.StringTokenizer;
public class Main {
static long expo(long base, long exp) {
long t = 1L;
while (exp > 0) {
if (exp % 2 != 0)
t = (t * base);
base = (base * base);
exp /= 2;
}
return t;
}
static int calcAngle(int h, int m) {
int hour_angle = (int) (0.5 * (h * 60 + m));
int minute_angle = (int) (6 * m);
int angle = Math.abs(hour_angle - minute_angle);
angle = Math.min(360 - angle, angle);
return angle;
}
public static void main(String args[]) throws Exception {
MyScanner sc = new MyScanner();
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double ans = 0.0;
double pi = 3.14159265358979323846264338327950;
//int angle = calcAngle(h, m);
double rad = pi * 2 * ((double)h / 12.0 + ((double)m / 60.0) / 12.0 - (double)m / 60.0);
ans = (double)((long)(a * a) + (long)(b * b)) - (double)((2.0 * a * b) * Math.cos(rad));
/*BigDecimal br = new BigDecimal(Double.toString(ans));
br = br.sqrt(new MathContext(20));*/
System.out.println(Math.sqrt(ans));
}
public static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
2,
2,
13,
17,
2,
13,
2,
17,
17,
2,
13,
17,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
13,
13,
4,
18,
13,
4,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
0,
13,
17,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
20,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
377,
11
],
[
377,
12
],
[
12,
13
],
[
12,
14
],
[
377,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
17,
38
],
[
38,
39
],
[
38,
40
],
[
41,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
44,
54
],
[
54,
55
],
[
54,
56
],
[
17,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
69,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
17,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
15,
82
],
[
82,
83
],
[
15,
84
],
[
84,
85
],
[
15,
86
],
[
86,
87
],
[
377,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
90,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
101,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
101,
122
],
[
122,
123
],
[
122,
124
],
[
90,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
90,
132
],
[
132,
133
],
[
88,
134
],
[
134,
135
],
[
88,
136
],
[
136,
137
],
[
377,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
140,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
147,
158
],
[
159,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
140,
163
],
[
163,
164
],
[
164,
165
],
[
138,
166
],
[
166,
167
],
[
0,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
168,
172
],
[
172,
173
],
[
172,
174
],
[
168,
176
],
[
176,
177
],
[
168,
178
],
[
178,
179
],
[
168,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
180,
188
],
[
188,
189
],
[
168,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
193,
198
],
[
198,
199
],
[
192,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
200,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
212,
213
],
[
208,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
217,
220
],
[
204,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
225,
226
],
[
226,
227
],
[
192,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
168,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
240,
238
],
[
250,
239
],
[
247,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
244,
246
],
[
247,
247
],
[
247,
248
],
[
247,
249
],
[
250,
250
],
[
250,
251
],
[
250,
252
],
[
240,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
233,
257
],
[
257,
258
],
[
168,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
262,
263
],
[
264,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
268
],
[
268,
269
],
[
268,
270
],
[
264,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
259,
275
],
[
275,
276
],
[
168,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
282,
283
],
[
281,
284
],
[
284,
285
],
[
168,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
290,
293
],
[
293,
294
],
[
168,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
300,
301
],
[
299,
302
],
[
302,
303
],
[
168,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
306,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
306,
319
],
[
319,
320
],
[
319,
321
],
[
306,
322
],
[
322,
323
],
[
323,
324
],
[
324,
325
],
[
324,
326
],
[
322,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
328,
331
],
[
327,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
306,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
168,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
342,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
347,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
342,
355
],
[
355,
356
],
[
355,
357
],
[
342,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
358,
363
],
[
363,
364
],
[
364,
365
],
[
365,
366
],
[
364,
367
],
[
363,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
342,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
0,
376
],
[
376,
377
],
[
376,
378
]
] |
[
"import java.util.*;\nimport java.io.*;\nimport static java.lang.Math.*;\n\npublic class Main {\n\n private static final int MOD = 998244353;\n\n public Main(FastScanner in, PrintWriter out, int test) {\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }\n\n private long pow(int x, int p) {\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }\n\n public static void main(String[] args) {\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }\n}\n\n\nclass FastScanner{\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream)\n {\n this.stream = stream;\n }\n\n int read()\n {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars){\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n boolean isSpaceChar(int c)\n {\n return c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1;\n }\n\n boolean isEndline(int c)\n {\n return c=='\\n'||c=='\\r'||c==-1;\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String next(){\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isSpaceChar(c));\n return res.toString();\n }\n\n String nextLine(){\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isEndline(c));\n return res.toString();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"public class Main {\n\n private static final int MOD = 998244353;\n\n public Main(FastScanner in, PrintWriter out, int test) {\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }\n\n private long pow(int x, int p) {\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }\n\n public static void main(String[] args) {\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }\n}",
"Main",
"private static final int MOD = 998244353;",
"MOD",
"998244353",
"public Main(FastScanner in, PrintWriter out, int test) {\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }",
"Main",
"{\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"int h = in.nextInt();",
"h",
"in.nextInt()",
"in.nextInt",
"in",
"int m = in.nextInt();",
"m",
"in.nextInt()",
"in.nextInt",
"in",
"double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);",
"theta",
"PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0)",
"PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0)",
"PI",
"2",
"(h / 12.0 + m / (60.0 * 12) - m / 60.0)",
"h / 12.0 + m / (60.0 * 12)",
"h / 12.0",
"h",
"12.0",
"m / (60.0 * 12)",
"m",
"(60.0 * 12)",
"60.0",
"12",
"m / 60.0",
"m",
"60.0",
"double csq = a * a + b * b - 2.0 * a * b * cos(theta);",
"csq",
"a * a + b * b - 2.0 * a * b * cos(theta)",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2.0 * a * b * cos(theta)",
"b",
"2.0 * a * b * cos(theta)",
"2.0",
"a",
"b",
"cos(theta)",
"cos",
"theta",
"out.println(sqrt(csq))",
"out.println",
"out",
"sqrt(csq)",
"sqrt",
"csq",
"FastScanner in",
"in",
"PrintWriter out",
"out",
"int test",
"test",
"private long pow(int x, int p) {\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }",
"pow",
"{\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }",
"long res = 1",
"res",
"1",
"a = x;",
"a",
"x",
"while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }",
"p > 1",
"p",
"1",
"{\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }",
"if (p % 2 == 1)\n res = res * a % MOD;",
"p % 2 == 1",
"p % 2",
"p",
"2",
"1",
"res = res * a % MOD",
"res",
"res * a % MOD",
"res * a",
"res",
"a",
"MOD",
"a = a * a % MOD",
"a",
"a * a % MOD",
"a * a",
"a",
"a",
"MOD",
"p /= 2",
"p",
"2",
"res = res * a % MOD",
"res",
"res * a % MOD",
"res * a",
"res",
"a",
"MOD",
"return res;",
"res",
"int x",
"x",
"int p",
"p",
"public static void main(String[] args) {\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }",
"main",
"{\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"FastScanner in = new FastScanner(System.in);",
"in",
"new FastScanner(System.in)",
"for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }",
"int t = 1;",
"int t = 1;",
"t",
"1",
"t <= 1",
"t",
"1",
"t++",
"t++",
"t",
"{\n Main sol = new Main(in, out, t);\n }",
"{\n Main sol = new Main(in, out, t);\n }",
"Main sol = new Main(in, out, t);",
"sol",
"new Main(in, out, t)",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"class FastScanner{\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n\n public FastScanner(InputStream stream)\n {\n this.stream = stream;\n }\n\n int read()\n {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars){\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n boolean isSpaceChar(int c)\n {\n return c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1;\n }\n\n boolean isEndline(int c)\n {\n return c=='\\n'||c=='\\r'||c==-1;\n }\n\n int nextInt()\n {\n return Integer.parseInt(next());\n }\n\n long nextLong()\n {\n return Long.parseLong(next());\n }\n\n double nextDouble()\n {\n return Double.parseDouble(next());\n }\n\n String next(){\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isSpaceChar(c));\n return res.toString();\n }\n\n String nextLine(){\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isEndline(c));\n return res.toString();\n }\n}",
"FastScanner",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"public FastScanner(InputStream stream)\n {\n this.stream = stream;\n }",
"FastScanner",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"int read()\n {\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars){\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1)\n throw new InputMismatchException();\n if (curChar >= numChars){\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (numChars == -1)\n throw new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars){\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try{\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n return -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"boolean isSpaceChar(int c)\n {\n return c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1;\n }",
"isSpaceChar",
"{\n return c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1;\n }",
"return c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1;",
"c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1",
"c=='\\t'",
"c=='\\r'",
"c==' '||c=='\\n'||c=='\\r'||c=='\\t'||c==-1",
"c==' '",
"c",
"' '",
"c=='\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"c=='\\t'",
"c",
"'\\t'",
"c==-1",
"c",
"-1",
"1",
"int c",
"c",
"boolean isEndline(int c)\n {\n return c=='\\n'||c=='\\r'||c==-1;\n }",
"isEndline",
"{\n return c=='\\n'||c=='\\r'||c==-1;\n }",
"return c=='\\n'||c=='\\r'||c==-1;",
"c=='\\n'||c=='\\r'||c==-1",
"c=='\\n'||c=='\\r'||c==-1",
"c=='\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"c==-1",
"c",
"-1",
"1",
"int c",
"c",
"int nextInt()\n {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong()\n {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble()\n {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String next(){\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isSpaceChar(c));\n return res.toString();\n }",
"next",
"{\n int c = read();\n while (isSpaceChar(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isSpaceChar(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n c = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do{\n res.appendCodePoint(c);\n c = read();\n }while(!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"String nextLine(){\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isEndline(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = read();\n while (isEndline(c))\n c = read();\n StringBuilder res = new StringBuilder();\n do{\n res.appendCodePoint(c);\n c = read();\n }while(!isEndline(c));\n return res.toString();\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isEndline(c))\n c = read();",
"isEndline(c)",
"isEndline",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do{\n res.appendCodePoint(c);\n c = read();\n }while(!isEndline(c));",
"!isEndline(c)",
"isEndline(c)",
"isEndline",
"c",
"{\n res.appendCodePoint(c);\n c = read();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public class Main {\n\n private static final int MOD = 998244353;\n\n public Main(FastScanner in, PrintWriter out, int test) {\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }\n\n private long pow(int x, int p) {\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }\n\n public static void main(String[] args) {\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }\n}",
"public class Main {\n\n private static final int MOD = 998244353;\n\n public Main(FastScanner in, PrintWriter out, int test) {\n int a = in.nextInt();\n int b = in.nextInt();\n int h = in.nextInt();\n int m = in.nextInt();\n\n double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);\n double csq = a * a + b * b - 2.0 * a * b * cos(theta);\n out.println(sqrt(csq));\n }\n\n private long pow(int x, int p) {\n long res = 1, a = x;\n while (p > 1) {\n if (p % 2 == 1)\n res = res * a % MOD;\n\n a = a * a % MOD;\n p /= 2;\n }\n res = res * a % MOD;\n return res;\n }\n\n public static void main(String[] args) {\n PrintWriter out = new PrintWriter(System.out);\n // Scanner in = new Scanner(\n // new BufferedReader(new InputStreamReader(System.in)));\n FastScanner in = new FastScanner(System.in);\n\n // int T = in.nextInt();\n for (int t = 1; t <= 1; t++) {\n Main sol = new Main(in, out, t);\n }\n\n out.close();\n }\n}",
"Main"
] |
import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
private static final int MOD = 998244353;
public Main(FastScanner in, PrintWriter out, int test) {
int a = in.nextInt();
int b = in.nextInt();
int h = in.nextInt();
int m = in.nextInt();
double theta = PI * 2 * (h / 12.0 + m / (60.0 * 12) - m / 60.0);
double csq = a * a + b * b - 2.0 * a * b * cos(theta);
out.println(sqrt(csq));
}
private long pow(int x, int p) {
long res = 1, a = x;
while (p > 1) {
if (p % 2 == 1)
res = res * a % MOD;
a = a * a % MOD;
p /= 2;
}
res = res * a % MOD;
return res;
}
public static void main(String[] args) {
PrintWriter out = new PrintWriter(System.out);
// Scanner in = new Scanner(
// new BufferedReader(new InputStreamReader(System.in)));
FastScanner in = new FastScanner(System.in);
// int T = in.nextInt();
for (int t = 1; t <= 1; t++) {
Main sol = new Main(in, out, t);
}
out.close();
}
}
class FastScanner{
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
public FastScanner(InputStream stream)
{
this.stream = stream;
}
int read()
{
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars){
curChar = 0;
try{
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
boolean isSpaceChar(int c)
{
return c==' '||c=='\n'||c=='\r'||c=='\t'||c==-1;
}
boolean isEndline(int c)
{
return c=='\n'||c=='\r'||c==-1;
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String next(){
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do{
res.appendCodePoint(c);
c = read();
}while(!isSpaceChar(c));
return res.toString();
}
String nextLine(){
int c = read();
while (isEndline(c))
c = read();
StringBuilder res = new StringBuilder();
do{
res.appendCodePoint(c);
c = read();
}while(!isEndline(c));
return res.toString();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
18,
13,
13,
2,
13,
17,
41,
13,
2,
2,
2,
17,
18,
13,
13,
2,
13,
17,
2,
2,
18,
13,
13,
17,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
2,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
4,
13,
18,
13,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
12,
13,
30,
4,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
30,
0,
13,
17,
42,
17,
30,
41,
13,
4,
13,
14,
2,
2,
17,
13,
2,
13,
17,
0,
13,
2,
2,
13,
17,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
29,
8,
13,
40,
13,
13,
37,
20,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
18,
13,
13,
13,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
29,
4,
13,
12,
13,
30,
42,
2,
4,
13,
2,
2,
18,
13,
13,
17,
2,
18,
13,
13,
17,
40,
13,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
2,
2,
13,
17,
2,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
507,
11
],
[
507,
12
],
[
12,
13
],
[
12,
14
],
[
507,
15
],
[
15,
16
],
[
15,
17
],
[
507,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
20,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
20,
41
],
[
41,
42
],
[
41,
43
],
[
44,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
20,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
56,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
20,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
91,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
18,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
103,
111
],
[
111,
112
],
[
111,
113
],
[
103,
114
],
[
114,
115
],
[
114,
116
],
[
103,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
122,
124
],
[
103,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
125,
133
],
[
133,
134
],
[
103,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
137,
144
],
[
144,
145
],
[
144,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
147,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
137,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
137,
167
],
[
167,
168
],
[
103,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
172,
180
],
[
180,
181
],
[
181,
182
],
[
103,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
191,
193
],
[
183,
194
],
[
194,
195
],
[
103,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
206,
208
],
[
199,
209
],
[
209,
210
],
[
103,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
213,
216
],
[
216,
217
],
[
217,
218
],
[
103,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
222,
226
],
[
226,
227
],
[
221,
228
],
[
228,
229
],
[
228,
230
],
[
221,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
221,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
240,
243
],
[
239,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
221,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
103,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
255,
259
],
[
259,
260
],
[
254,
261
],
[
261,
262
],
[
261,
263
],
[
254,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
254,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
276,
278
],
[
268,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
284,
285
],
[
284,
286
],
[
279,
287
],
[
287,
288
],
[
288,
289
],
[
279,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
254,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
296,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
306,
307
],
[
306,
308
],
[
301,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
315,
316
],
[
315,
317
],
[
301,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
319,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
318,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
331,
332
],
[
329,
333
],
[
318,
334
],
[
334,
335
],
[
103,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
338,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
347,
349
],
[
344,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
343,
355
],
[
355,
356
],
[
338,
357
],
[
357,
358
],
[
103,
359
],
[
359,
360
],
[
359,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
363,
366
],
[
366,
367
],
[
103,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
371,
375
],
[
375,
376
],
[
370,
377
],
[
377,
378
],
[
378,
379
],
[
103,
380
],
[
380,
381
],
[
380,
382
],
[
382,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
384,
387
],
[
387,
388
],
[
388,
389
],
[
389,
390
],
[
389,
391
],
[
388,
392
],
[
387,
393
],
[
393,
394
],
[
394,
395
],
[
394,
396
],
[
393,
397
],
[
383,
398
],
[
398,
399
],
[
382,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
400,
404
],
[
404,
405
],
[
382,
406
],
[
406,
407
],
[
406,
408
],
[
382,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
382,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
415,
417
],
[
414,
418
],
[
418,
419
],
[
418,
420
],
[
413,
421
],
[
421,
422
],
[
422,
423
],
[
423,
424
],
[
422,
425
],
[
421,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
382,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
103,
434
],
[
434,
435
],
[
434,
436
],
[
436,
437
],
[
437,
438
],
[
437,
439
],
[
436,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
441,
446
],
[
446,
447
],
[
446,
448
],
[
441,
449
],
[
449,
450
],
[
450,
451
],
[
441,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
453,
457
],
[
457,
458
],
[
436,
459
],
[
459,
460
],
[
434,
461
],
[
461,
462
],
[
103,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
466,
467
],
[
466,
468
],
[
465,
470
],
[
470,
471
],
[
471,
472
],
[
472,
473
],
[
472,
474
],
[
470,
475
],
[
475,
476
],
[
475,
477
],
[
470,
478
],
[
478,
479
],
[
479,
480
],
[
470,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
482,
486
],
[
486,
487
],
[
465,
488
],
[
488,
489
],
[
463,
490
],
[
490,
491
],
[
103,
492
],
[
492,
493
],
[
492,
494
],
[
494,
495
],
[
495,
496
],
[
496,
497
],
[
496,
498
],
[
498,
499
],
[
499,
500
],
[
500,
501
],
[
495,
502
],
[
502,
503
],
[
503,
504
],
[
504,
505
],
[
0,
506
],
[
506,
507
],
[
506,
508
]
] |
[
"import java.util.*;\nimport java.io.*;\nimport java.lang.reflect.Array;\n\npublic class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n\n static public void main(String args[]) {\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }\n}\n\nclass Reader {\n \n private final InputStream in;\n private final byte[] buf = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n \n public Reader() { this(System.in);}\n public Reader(InputStream source) { this.in = source;}\n \n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }\n \n private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}\n \n private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n \n private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}\n \n public boolean hasNext() {skip(); return hasNextByte();}\n \n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n \n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }\n \n public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }\n \n public double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }\n \n public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }\n \n public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }\n \n public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}};\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n\n static public void main(String args[]) {\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }\n}",
"Main",
"static final Reader sc = new Reader();",
"sc",
"new Reader()",
"static final PrintWriter out = new PrintWriter(System.out,false);",
"out",
"new PrintWriter(System.out,false)",
"static public void main(String args[]) {\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }",
"main",
"{\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }",
"double a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double mDeg = 2 * Math.PI * (m / 60);",
"mDeg",
"2 * Math.PI * (m / 60)",
"2 * Math.PI * (m / 60)",
"2",
"Math.PI",
"Math",
"Math.PI",
"(m / 60)",
"m",
"60",
"double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);",
"hDeg",
"2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60)",
"2 * Math.PI * (h / 12)",
"2 * Math.PI * (h / 12)",
"2",
"Math.PI",
"Math",
"Math.PI",
"(h / 12)",
"h",
"12",
"(Math.PI / 6) * (m / 60)",
"(Math.PI / 6)",
"Math.PI",
"Math",
"Math.PI",
"6",
"(m / 60)",
"m",
"60",
"System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg))",
"Math.sqrt",
"Math",
"a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2 * a * b * Math.cos(mDeg - hDeg)",
"b",
"2 * a * b * Math.cos(mDeg - hDeg)",
"2",
"a",
"b",
"Math.cos(mDeg - hDeg)",
"Math.cos",
"Math",
"mDeg - hDeg",
"mDeg",
"hDeg",
"String args[]",
"args",
"class Reader {\n \n private final InputStream in;\n private final byte[] buf = new byte[1024];\n private int ptr = 0;\n private int buflen = 0;\n \n public Reader() { this(System.in);}\n public Reader(InputStream source) { this.in = source;}\n \n private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }\n \n private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}\n \n private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n \n private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}\n \n public boolean hasNext() {skip(); return hasNextByte();}\n \n public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n \n public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }\n \n public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }\n \n public double nextDouble() {\n return Double.parseDouble(next());\n }\n \n public char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }\n \n public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }\n \n public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }\n \n public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }\n \n public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}};\n}",
"Reader",
"private final InputStream in;",
"in",
"private final byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"public Reader() { this(System.in);}",
"Reader",
"{ this(System.in);}",
"this(System.in)",
"this",
"System.in",
"System",
"System.in",
"public Reader(InputStream source) { this.in = source;}",
"Reader",
"{ this.in = source;}",
"this.in = source",
"this.in",
"this",
"this.in",
"source",
"InputStream source",
"source",
"private boolean hasNextByte() {\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }",
"hasNextByte",
"{\n if (ptr < buflen) return true;\n ptr = 0;\n try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}\n if (buflen <= 0) return false;\n return true;\n }",
"if (ptr < buflen) return true;",
"ptr < buflen",
"ptr",
"buflen",
"return true;",
"true",
"ptr = 0",
"ptr",
"0",
"try{\n buflen = in.read(buf);\n }catch (IOException e) {e.printStackTrace();}",
"catch (IOException e) {e.printStackTrace();}",
"IOException e",
"{e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n buflen = in.read(buf);\n }",
"buflen = in.read(buf)",
"buflen",
"in.read(buf)",
"in.read",
"in",
"buf",
"if (buflen <= 0) return false;",
"buflen <= 0",
"buflen",
"0",
"return false;",
"false",
"return true;",
"true",
"private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}",
"readByte",
"{ if (hasNextByte()) return buf[ptr++]; else return -1;}",
"if (hasNextByte()) return buf[ptr++]; else return -1;",
"hasNextByte()",
"hasNextByte",
"return buf[ptr++];",
"buf[ptr++]",
"buf",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}",
"isPrintableChar",
"{ return 33 <= c && c <= 126;}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}",
"skip",
"{ while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}",
"while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buf[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buf[ptr])",
"isPrintableChar(buf[ptr])",
"isPrintableChar",
"buf[ptr]",
"buf",
"ptr",
"ptr++",
"ptr",
"public boolean hasNext() {skip(); return hasNextByte();}",
"hasNext",
"{skip(); return hasNextByte();}",
"skip()",
"skip",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"next",
"{\n if (!hasNext()) throw new NoSuchElementException();\n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }",
"nextLong",
"{\n if (!hasNext()) throw new NoSuchElementException();\n boolean minus = false;\n long num = readByte();\n \n if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }\n \n while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }\n }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"boolean minus = false;",
"minus",
"false",
"long num = readByte();",
"num",
"readByte()",
"readByte",
"if(num == '-'){\n num = 0;\n minus = true;\n }else if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }",
"num == '-'",
"num",
"'-'",
"{\n num = 0;\n minus = true;\n }",
"num = 0",
"num",
"0",
"minus = true",
"minus",
"true",
"if (num < '0' || '9' < num){\n throw new NumberFormatException();\n }else{\n num -= '0';\n }",
"num < '0' || '9' < num",
"num < '0'",
"num",
"'0'",
"'9' < num",
"'9'",
"num",
"{\n throw new NumberFormatException();\n }",
"throw new NumberFormatException();",
"new NumberFormatException()",
"{\n num -= '0';\n }",
"num -= '0'",
"num",
"'0'",
"while(true){\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }",
"true",
"{\n int b = readByte();\n if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();\n }",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if('0' <= b && b <= '9')\n num = num * 10 + (b - '0');\n else if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"if(b == -1 || !isPrintableChar(b))\n return minus ? -num : num;\n else\n throw new NoSuchElementException();",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"public int nextInt() {\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }",
"nextInt",
"{\n long num = nextLong();\n if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();\n return (int)num;\n }",
"long num = nextLong();",
"num",
"nextLong()",
"nextLong",
"if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)\n throw new NumberFormatException();",
"num < Integer.MIN_VALUE || Integer.MAX_VALUE < num",
"num < Integer.MIN_VALUE",
"num",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"Integer.MAX_VALUE < num",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"num",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int)num;",
"(int)num",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public char nextChar() {\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }",
"nextChar",
"{\n if (!hasNext()) throw new NoSuchElementException();\n return (char)readByte();\n }",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"return (char)readByte();",
"(char)readByte()",
"readByte",
"public String nextLine() {\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }",
"nextLine",
"{\n while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;\n if (!hasNextByte()) throw new NoSuchElementException();\n \n StringBuilder sb = new StringBuilder();\n int b = readByte();\n while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }\n \n return sb.toString();\n }",
"while (hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')) ptr++;",
"hasNextByte() && (buf[ptr] == '\\n' || buf[ptr] == '\\r')",
"hasNextByte()",
"hasNextByte",
"(buf[ptr] == '\\n' || buf[ptr] == '\\r')",
"buf[ptr] == '\\n'",
"buf[ptr]",
"buf",
"ptr",
"'\\n'",
"buf[ptr] == '\\r'",
"buf[ptr]",
"buf",
"ptr",
"'\\r'",
"ptr++",
"ptr",
"if (!hasNextByte()) throw new NoSuchElementException();",
"!hasNextByte()",
"hasNextByte()",
"hasNextByte",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (b != '\\n' && b != '\\r') {\n sb.appendCodePoint(b);\n b = readByte();\n }",
"b != '\\n' && b != '\\r'",
"b != '\\n'",
"b",
"'\\n'",
"b != '\\r'",
"b",
"'\\r'",
"{\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public int[] nextIntArray(int n) {\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }",
"nextIntArray",
"{\n int[] res = new int[n];\n for (int i=0; i<n; i++) res[i] = nextInt();\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i=0; i<n; i++) res[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"res[i] = nextInt();",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"int n",
"n",
"public char[] nextCharArray(int n) {\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }",
"nextCharArray",
"{\n char[] res = new char[n];\n for (int i=0; i<n; i++) res[i] = nextChar();\n return res;\n }",
"char[] res = new char[n];",
"res",
"new char[n]",
"n",
"for (int i=0; i<n; i++) res[i] = nextChar();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"res[i] = nextChar();",
"res[i] = nextChar()",
"res[i]",
"res",
"i",
"nextChar()",
"nextChar",
"return res;",
"res",
"int n",
"n",
"public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}}",
"close",
"{try{ in.close();}catch(IOException e){ e.printStackTrace();}}",
"try{ in.close();}catch(IOException e){ e.printStackTrace();}",
"catch(IOException e){ e.printStackTrace();}",
"IOException e",
"{ e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ in.close();}",
"in.close()",
"in.close",
"in",
"public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n\n static public void main(String args[]) {\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }\n}",
"public class Main {\n\n static final Reader sc = new Reader();\n static final PrintWriter out = new PrintWriter(System.out,false);\n\n static public void main(String args[]) {\n double a = sc.nextInt();\n double b = sc.nextInt();\n double h = sc.nextInt();\n double m = sc.nextInt();\n double mDeg = 2 * Math.PI * (m / 60);\n double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);\n System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));\n }\n}",
"Main"
] |
import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
public class Main {
static final Reader sc = new Reader();
static final PrintWriter out = new PrintWriter(System.out,false);
static public void main(String args[]) {
double a = sc.nextInt();
double b = sc.nextInt();
double h = sc.nextInt();
double m = sc.nextInt();
double mDeg = 2 * Math.PI * (m / 60);
double hDeg = 2 * Math.PI * (h / 12) + (Math.PI / 6) * (m / 60);
System.out.println(Math.sqrt(a * a + b * b - 2 * a * b * Math.cos(mDeg - hDeg)));
}
}
class Reader {
private final InputStream in;
private final byte[] buf = new byte[1024];
private int ptr = 0;
private int buflen = 0;
public Reader() { this(System.in);}
public Reader(InputStream source) { this.in = source;}
private boolean hasNextByte() {
if (ptr < buflen) return true;
ptr = 0;
try{
buflen = in.read(buf);
}catch (IOException e) {e.printStackTrace();}
if (buflen <= 0) return false;
return true;
}
private int readByte() { if (hasNextByte()) return buf[ptr++]; else return -1;}
private boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
private void skip() { while(hasNextByte() && !isPrintableChar(buf[ptr])) ptr++;}
public boolean hasNext() {skip(); return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
boolean minus = false;
long num = readByte();
if(num == '-'){
num = 0;
minus = true;
}else if (num < '0' || '9' < num){
throw new NumberFormatException();
}else{
num -= '0';
}
while(true){
int b = readByte();
if('0' <= b && b <= '9')
num = num * 10 + (b - '0');
else if(b == -1 || !isPrintableChar(b))
return minus ? -num : num;
else
throw new NoSuchElementException();
}
}
public int nextInt() {
long num = nextLong();
if (num < Integer.MIN_VALUE || Integer.MAX_VALUE < num)
throw new NumberFormatException();
return (int)num;
}
public double nextDouble() {
return Double.parseDouble(next());
}
public char nextChar() {
if (!hasNext()) throw new NoSuchElementException();
return (char)readByte();
}
public String nextLine() {
while (hasNextByte() && (buf[ptr] == '\n' || buf[ptr] == '\r')) ptr++;
if (!hasNextByte()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (b != '\n' && b != '\r') {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public int[] nextIntArray(int n) {
int[] res = new int[n];
for (int i=0; i<n; i++) res[i] = nextInt();
return res;
}
public char[] nextCharArray(int n) {
char[] res = new char[n];
for (int i=0; i<n; i++) res[i] = nextChar();
return res;
}
public void close() {try{ in.close();}catch(IOException e){ e.printStackTrace();}};
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
2,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
72,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
72,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] |
[
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) throws Exception{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) throws Exception{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"double a = scn.nextDouble();",
"a",
"scn.nextDouble()",
"scn.nextDouble",
"scn",
"double b = scn.nextDouble();",
"b",
"scn.nextDouble()",
"scn.nextDouble",
"scn",
"double h = scn.nextDouble();",
"h",
"scn.nextDouble()",
"scn.nextDouble",
"scn",
"double m = scn.nextDouble();",
"m",
"scn.nextDouble()",
"scn.nextDouble",
"scn",
"double hh = h*30 + m/2;",
"hh",
"h*30 + m/2",
"h*30",
"h",
"30",
"m/2",
"m",
"2",
"double mm = m*6;",
"mm",
"m*6",
"m",
"6",
"double x =hh - mm;",
"x",
"hh - mm",
"hh",
"mm",
"double cosx = Math.cos(Math.toRadians(x));",
"cosx",
"Math.cos(Math.toRadians(x))",
"Math.cos",
"Math",
"Math.toRadians(x)",
"Math.toRadians",
"Math",
"x",
"double ans2 = a*a + b*b - 2*a*b*cosx;",
"ans2",
"a*a + b*b - 2*a*b*cosx",
"a*a + b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b*cosx",
"b",
"2*a*b*cosx",
"2",
"a",
"b",
"cosx",
"double ans = Math.sqrt(ans2);",
"ans",
"Math.sqrt(ans2)",
"Math.sqrt",
"Math",
"ans2",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws Exception{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception{\n\t\tScanner scn = new Scanner(System.in);\n\t\tdouble a = scn.nextDouble();\n double b = scn.nextDouble();\n double h = scn.nextDouble();\n double m = scn.nextDouble();\n double hh = h*30 + m/2;\n double mm = m*6;\n double x =hh - mm; \n double cosx = Math.cos(Math.toRadians(x));\n double ans2 = a*a + b*b - 2*a*b*cosx;\n double ans = Math.sqrt(ans2);\n System.out.println(ans);\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception{
Scanner scn = new Scanner(System.in);
double a = scn.nextDouble();
double b = scn.nextDouble();
double h = scn.nextDouble();
double m = scn.nextDouble();
double hh = h*30 + m/2;
double mm = m*6;
double x =hh - mm;
double cosx = Math.cos(Math.toRadians(x));
double ans2 = a*a + b*b - 2*a*b*cosx;
double ans = Math.sqrt(ans2);
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
13,
17,
17,
0,
13,
2,
17,
2,
13,
17,
41,
13,
2,
2,
13,
13,
2,
13,
13,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
4,
18,
13,
13,
0,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
106,
11
],
[
106,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
14,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
14,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
14,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
14,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
14,
85
],
[
85,
86
],
[
85,
87
],
[
89,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
89,
93
],
[
14,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
12,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] |
[
"import java.io.*;\nimport java.math.*;\nimport java.util.*;\npublic class Main { \n\tpublic static void main(String[] args) { \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main { \n\tpublic static void main(String[] args) { \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main",
"public static void main(String[] args) { \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"main",
"{ \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"double HourLength = input.nextDouble();",
"HourLength",
"input.nextDouble()",
"input.nextDouble",
"input",
"double MinLength = input.nextDouble();",
"MinLength",
"input.nextDouble()",
"input.nextDouble",
"input",
"double H = input.nextDouble();",
"H",
"input.nextDouble()",
"input.nextDouble",
"input",
"double M = input.nextDouble();",
"M",
"input.nextDouble()",
"input.nextDouble",
"input",
"double Htheta = (H/12)*360.0;",
"Htheta",
"(H/12)*360.0",
"(H/12)",
"H",
"12",
"360.0",
"double Mtheta = (M/60)*360.0;",
"Mtheta",
"(M/60)*360.0",
"(M/60)",
"M",
"60",
"360.0",
"Htheta+=30.0*(Mtheta/360.0)",
"Htheta",
"30.0*(Mtheta/360.0)",
"30.0",
"(Mtheta/360.0)",
"Mtheta",
"360.0",
"double ans = HourLength*HourLength+MinLength*MinLength;",
"ans",
"HourLength*HourLength+MinLength*MinLength",
"HourLength*HourLength",
"HourLength",
"HourLength",
"MinLength*MinLength",
"MinLength",
"MinLength",
"double TotalAngle = Math.abs(Htheta-Mtheta);",
"TotalAngle",
"Math.abs(Htheta-Mtheta)",
"Math.abs",
"Math",
"Htheta-Mtheta",
"Htheta",
"Mtheta",
"double cos = Math.cos(Math.toRadians(TotalAngle));",
"cos",
"Math.cos(Math.toRadians(TotalAngle))",
"Math.cos",
"Math",
"Math.toRadians(TotalAngle)",
"Math.toRadians",
"Math",
"TotalAngle",
"ans-=2*HourLength*MinLength*cos",
"ans",
"2*HourLength*MinLength*cos",
"MinLength",
"2*HourLength*MinLength*cos",
"2",
"HourLength",
"MinLength",
"cos",
"System.out.println(Math.sqrt(ans))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"String[] args",
"args",
"public class Main { \n\tpublic static void main(String[] args) { \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"public class Main { \n\tpublic static void main(String[] args) { \n\t\tScanner input = new Scanner(System.in);\n\t\tdouble HourLength = input.nextDouble();\n\t\tdouble MinLength = input.nextDouble();\n\t\tdouble H = input.nextDouble();\n\t\tdouble M = input.nextDouble();\n\t\tdouble Htheta = (H/12)*360.0;\n\t\tdouble Mtheta = (M/60)*360.0;\n\t\tHtheta+=30.0*(Mtheta/360.0);\n\t\tdouble ans = HourLength*HourLength+MinLength*MinLength;\n\t\tdouble TotalAngle = Math.abs(Htheta-Mtheta);\n\t\tdouble cos = Math.cos(Math.toRadians(TotalAngle));\n\t\tans-=2*HourLength*MinLength*cos;\n\t\t//System.out.println(cos);\n\t\tSystem.out.println(Math.sqrt(ans));\n\t}\n}",
"Main"
] |
import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
double HourLength = input.nextDouble();
double MinLength = input.nextDouble();
double H = input.nextDouble();
double M = input.nextDouble();
double Htheta = (H/12)*360.0;
double Mtheta = (M/60)*360.0;
Htheta+=30.0*(Mtheta/360.0);
double ans = HourLength*HourLength+MinLength*MinLength;
double TotalAngle = Math.abs(Htheta-Mtheta);
double cos = Math.cos(Math.toRadians(TotalAngle));
ans-=2*HourLength*MinLength*cos;
//System.out.println(cos);
System.out.println(Math.sqrt(ans));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
4,
18,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
132,
17
],
[
132,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
132,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
55,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
55,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
55,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
55,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
95,
97
],
[
55,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
114,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
53,
125
],
[
125,
126
],
[
53,
127
],
[
127,
128
],
[
53,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] |
[
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Mehvix\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc168_c {\n public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }\n\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc168_c {\n public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"abc168_c solver = new abc168_c();",
"solver",
"new abc168_c()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class abc168_c {\n public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }\n\n }",
"abc168_c",
"public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }",
"solve",
"{\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }",
"double a = fin.nextInt();",
"a",
"fin.nextInt()",
"fin.nextInt",
"fin",
"double b = fin.nextInt();",
"b",
"fin.nextInt()",
"fin.nextInt",
"fin",
"double h = fin.nextInt();",
"h",
"fin.nextInt()",
"fin.nextInt",
"fin",
"double m = fin.nextInt();",
"m",
"fin.nextInt()",
"fin.nextInt",
"fin",
"double minAng = (m * 6.0);",
"minAng",
"(m * 6.0)",
"m",
"6.0",
"double hrAng = (h * 30.0 + minAng / 12.0);",
"hrAng",
"(h * 30.0 + minAng / 12.0)",
"h * 30.0",
"h",
"30.0",
"minAng / 12.0",
"minAng",
"12.0",
"double diffAngl = Math.abs(hrAng - minAng);",
"diffAngl",
"Math.abs(hrAng - minAng)",
"Math.abs",
"Math",
"hrAng - minAng",
"hrAng",
"minAng",
"fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))))",
"fout.println",
"fout",
"Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl)))))",
"Math.sqrt",
"Math",
"(a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2 * a * b * Math.cos((Math.toRadians(diffAngl)))",
"b",
"2 * a * b * Math.cos((Math.toRadians(diffAngl)))",
"2",
"a",
"b",
"Math.cos((Math.toRadians(diffAngl)))",
"Math.cos",
"Math",
"(Math.toRadians(diffAngl))",
"Math.toRadians",
"Math",
"diffAngl",
"int testNumber",
"testNumber",
"Scanner fin",
"fin",
"PrintWriter fout",
"fout",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc168_c {\n public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n abc168_c solver = new abc168_c();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class abc168_c {\n public void solve(int testNumber, Scanner fin, PrintWriter fout) {\n double a = fin.nextInt(); // hr len\n double b = fin.nextInt(); // min len\n double h = fin.nextInt();\n double m = fin.nextInt();\n\n double minAng = (m * 6.0);\n double hrAng = (h * 30.0 + minAng / 12.0);\n double diffAngl = Math.abs(hrAng - minAng);\n\n// System.out.println(diffAngl);\n\n fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));\n\n }\n\n }\n}",
"Main"
] |
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Mehvix
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
abc168_c solver = new abc168_c();
solver.solve(1, in, out);
out.close();
}
static class abc168_c {
public void solve(int testNumber, Scanner fin, PrintWriter fout) {
double a = fin.nextInt(); // hr len
double b = fin.nextInt(); // min len
double h = fin.nextInt();
double m = fin.nextInt();
double minAng = (m * 6.0);
double hrAng = (h * 30.0 + minAng / 12.0);
double diffAngl = Math.abs(hrAng - minAng);
// System.out.println(diffAngl);
fout.println(Math.sqrt((a * a + b * b - 2 * a * b * Math.cos((Math.toRadians(diffAngl))))));
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
2,
2,
13,
18,
13,
13,
17,
0,
13,
2,
4,
18,
13,
13,
13,
0,
13,
2,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
13,
12,
13,
30,
29,
13,
12,
13,
30,
41,
13,
4,
18,
13,
2,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
2,
13,
4,
18,
13,
17,
29,
4,
18,
13,
2,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
17,
13,
13,
6,
13,
12,
13,
30,
41,
13,
20,
38,
30,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
4,
8
],
[
8,
9
],
[
4,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
15,
21
],
[
12,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
12,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
10,
38
],
[
38,
39
],
[
10,
40
],
[
40,
41
],
[
4,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
4,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
4,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
57,
65
],
[
54,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
68,
76
],
[
54,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
52,
84
],
[
84,
85
],
[
4,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
89,
95
],
[
89,
96
],
[
0,
97
],
[
152,
98
],
[
152,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
110,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
110,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
110,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
110,
131
],
[
131,
132
],
[
131,
133
],
[
110,
134
],
[
134,
135
],
[
134,
136
],
[
110,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
110,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
99,
149
],
[
149,
150
],
[
0,
151
],
[
151,
152
],
[
151,
153
]
] |
[
"import java.util.*;\n\nclass Point {\n double x;\n double y;\n\n public Point(double deg, double r) {\n double rad = deg * Math.PI / 180.0;\n x = Math.cos(rad) * r;\n y = Math.sin(rad) * r;\n // System.out.printf(\"[%f, %f]\\n\", x, y);\n }\n\n public double getX() {\n return x;\n }\n\n public double getY() {\n return y;\n }\n\n public double distance(Point b) {\n double c = Math.pow(x - b.getX(), 2);\n double d = Math.pow(y - b.getY(), 2);\n return Math.sqrt(c + d);\n }\n\n public void show() {\n System.out.printf(\"[%f, %f]\\n\", x, y);\n }\n}\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Point {\n double x;\n double y;\n\n public Point(double deg, double r) {\n double rad = deg * Math.PI / 180.0;\n x = Math.cos(rad) * r;\n y = Math.sin(rad) * r;\n // System.out.printf(\"[%f, %f]\\n\", x, y);\n }\n\n public double getX() {\n return x;\n }\n\n public double getY() {\n return y;\n }\n\n public double distance(Point b) {\n double c = Math.pow(x - b.getX(), 2);\n double d = Math.pow(y - b.getY(), 2);\n return Math.sqrt(c + d);\n }\n\n public void show() {\n System.out.printf(\"[%f, %f]\\n\", x, y);\n }\n}",
"Point",
"double x;",
"x",
"double y;",
"y",
"public Point(double deg, double r) {\n double rad = deg * Math.PI / 180.0;\n x = Math.cos(rad) * r;\n y = Math.sin(rad) * r;\n // System.out.printf(\"[%f, %f]\\n\", x, y);\n }",
"Point",
"{\n double rad = deg * Math.PI / 180.0;\n x = Math.cos(rad) * r;\n y = Math.sin(rad) * r;\n // System.out.printf(\"[%f, %f]\\n\", x, y);\n }",
"double rad = deg * Math.PI / 180.0;",
"rad",
"deg * Math.PI / 180.0",
"deg * Math.PI",
"deg",
"Math.PI",
"Math",
"Math.PI",
"180.0",
"x = Math.cos(rad) * r",
"x",
"Math.cos(rad) * r",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"r",
"y = Math.sin(rad) * r",
"y",
"Math.sin(rad) * r",
"Math.sin(rad)",
"Math.sin",
"Math",
"rad",
"r",
"double deg",
"deg",
"double r",
"r",
"public double getX() {\n return x;\n }",
"getX",
"{\n return x;\n }",
"return x;",
"x",
"public double getY() {\n return y;\n }",
"getY",
"{\n return y;\n }",
"return y;",
"y",
"public double distance(Point b) {\n double c = Math.pow(x - b.getX(), 2);\n double d = Math.pow(y - b.getY(), 2);\n return Math.sqrt(c + d);\n }",
"distance",
"{\n double c = Math.pow(x - b.getX(), 2);\n double d = Math.pow(y - b.getY(), 2);\n return Math.sqrt(c + d);\n }",
"double c = Math.pow(x - b.getX(), 2);",
"c",
"Math.pow(x - b.getX(), 2)",
"Math.pow",
"Math",
"x - b.getX()",
"x",
"b.getX()",
"b.getX",
"b",
"2",
"double d = Math.pow(y - b.getY(), 2);",
"d",
"Math.pow(y - b.getY(), 2)",
"Math.pow",
"Math",
"y - b.getY()",
"y",
"b.getY()",
"b.getY",
"b",
"2",
"return Math.sqrt(c + d);",
"Math.sqrt(c + d)",
"Math.sqrt",
"Math",
"c + d",
"c",
"d",
"Point b",
"b",
"public void show() {\n System.out.printf(\"[%f, %f]\\n\", x, y);\n }",
"show",
"{\n System.out.printf(\"[%f, %f]\\n\", x, y);\n }",
"System.out.printf(\"[%f, %f]\\n\", x, y)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"[%f, %f]\\n\"",
"x",
"y",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }",
"{\n scanner.close();\n }",
"scanner.close()",
"scanner.close",
"scanner",
"{\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n }",
"double a = scanner.nextDouble();",
"a",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"double b = scanner.nextDouble();",
"b",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"double h = scanner.nextDouble();",
"h",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"double m = scanner.nextDouble();",
"m",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"Point bigHand = new Point(m * 6.0, b);",
"bigHand",
"new Point(m * 6.0, b)",
"Point smallHand = new Point(h * 30.0 + m * 0.5, a);",
"smallHand",
"new Point(h * 30.0 + m * 0.5, a)",
"double ans = bigHand.distance(smallHand);",
"ans",
"bigHand.distance(smallHand)",
"bigHand.distance",
"bigHand",
"smallHand",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n try {\n double a = scanner.nextDouble();\n double b = scanner.nextDouble();\n double h = scanner.nextDouble();\n double m = scanner.nextDouble();\n\n // 長針\n Point bigHand = new Point(m * 6.0, b);\n\n // 短針\n Point smallHand = new Point(h * 30.0 + m * 0.5, a);\n\n double ans = bigHand.distance(smallHand);\n System.out.println(ans);\n } finally {\n scanner.close();\n }\n }\n}",
"Main"
] |
import java.util.*;
class Point {
double x;
double y;
public Point(double deg, double r) {
double rad = deg * Math.PI / 180.0;
x = Math.cos(rad) * r;
y = Math.sin(rad) * r;
// System.out.printf("[%f, %f]\n", x, y);
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public double distance(Point b) {
double c = Math.pow(x - b.getX(), 2);
double d = Math.pow(y - b.getY(), 2);
return Math.sqrt(c + d);
}
public void show() {
System.out.printf("[%f, %f]\n", x, y);
}
}
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
try {
double a = scanner.nextDouble();
double b = scanner.nextDouble();
double h = scanner.nextDouble();
double m = scanner.nextDouble();
// 長針
Point bigHand = new Point(m * 6.0, b);
// 短針
Point smallHand = new Point(h * 30.0 + m * 0.5, a);
double ans = bigHand.distance(smallHand);
System.out.println(ans);
} finally {
scanner.close();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
41,
13,
2,
2,
18,
13,
13,
4,
18,
13,
2,
2,
2,
17,
13,
2,
17,
13,
2,
17,
13,
17,
4,
18,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
124,
11
],
[
124,
12
],
[
12,
13
],
[
124,
14
],
[
14,
15
],
[
124,
16
],
[
16,
17
],
[
124,
18
],
[
18,
19
],
[
124,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
22,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
31,
36
],
[
22,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
42,
44
],
[
22,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
50,
52
],
[
22,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
58,
60
],
[
22,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
66,
68
],
[
22,
69
],
[
69,
70
],
[
70,
71
],
[
22,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
87,
89
],
[
82,
90
],
[
90,
91
],
[
90,
92
],
[
74,
93
],
[
22,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
100,
108
],
[
110,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
110,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
22,
118
],
[
118,
119
],
[
119,
120
],
[
20,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n\npublic class Main {\n\n static double a, b, h, m;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"public class Main {\n\n static double a, b, h, m;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }\n}",
"Main",
"static double a",
"a",
"b",
"b",
"h",
"h",
"m;",
"m",
"public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }",
"main",
"{\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"String[] in = br.readLine().split(\" \");",
"in",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"a = Double.parseDouble(in[0])",
"a",
"Double.parseDouble(in[0])",
"Double.parseDouble",
"Double",
"in[0]",
"in",
"0",
"b = Double.parseDouble(in[1])",
"b",
"Double.parseDouble(in[1])",
"Double.parseDouble",
"Double",
"in[1]",
"in",
"1",
"h = Double.parseDouble(in[2])",
"h",
"Double.parseDouble(in[2])",
"Double.parseDouble",
"Double",
"in[2]",
"in",
"2",
"m = Double.parseDouble(in[3])",
"m",
"Double.parseDouble(in[3])",
"Double.parseDouble",
"Double",
"in[3]",
"in",
"3",
"br.close()",
"br.close",
"br",
"double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;",
"ang",
"Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0",
"Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m)",
"Math.PI",
"Math",
"Math.PI",
"Math.abs(30.0 * h + 0.5 * m - 6.0 * m)",
"Math.abs",
"Math",
"30.0 * h + 0.5 * m - 6.0 * m",
"30.0 * h + 0.5 * m",
"30.0 * h",
"30.0",
"h",
"0.5 * m",
"0.5",
"m",
"6.0 * m",
"6.0",
"m",
"180.0",
"out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)))",
"out.println",
"out",
"Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang))",
"Math.sqrt",
"Math",
"a * a + b * b - 2.0 * a * b * Math.cos(ang)",
"a * a + b * b",
"a * a",
"a",
"a",
"b * b",
"b",
"b",
"2.0 * a * b * Math.cos(ang)",
"b",
"2.0 * a * b * Math.cos(ang)",
"2.0",
"a",
"b",
"Math.cos(ang)",
"Math.cos",
"Math",
"ang",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"public class Main {\n\n static double a, b, h, m;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }\n}",
"public class Main {\n\n static double a, b, h, m;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n String[] in = br.readLine().split(\" \");\n a = Double.parseDouble(in[0]);\n b = Double.parseDouble(in[1]);\n h = Double.parseDouble(in[2]);\n m = Double.parseDouble(in[3]);\n\n br.close();\n\n double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;\n\n out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));\n\n out.flush();\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
static double a, b, h, m;
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
String[] in = br.readLine().split(" ");
a = Double.parseDouble(in[0]);
b = Double.parseDouble(in[1]);
h = Double.parseDouble(in[2]);
m = Double.parseDouble(in[3]);
br.close();
double ang = Math.PI * Math.abs(30.0 * h + 0.5 * m - 6.0 * m) / 180.0;
out.println(Math.sqrt(a * a + b * b - 2.0 * a * b * Math.cos(ang)));
out.flush();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
2,
17,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
8,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
61,
65
],
[
54,
66
],
[
68,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double aAng = h * 30 + m * 0.5;",
"aAng",
"h * 30 + m * 0.5",
"h * 30",
"h",
"30",
"m * 0.5",
"m",
"0.5",
"double bAng = m * 6;",
"bAng",
"m * 6",
"m",
"6",
"System.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng)))))",
"Math.sqrt",
"Math",
"Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))",
"b",
"2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))",
"Math.cos",
"Math",
"Math.toRadians(Math.abs(360-(aAng - bAng)))",
"Math.toRadians",
"Math",
"Math.abs(360-(aAng - bAng))",
"Math.abs",
"Math",
"360-(aAng - bAng)",
"360",
"(aAng - bAng)",
"aAng",
"bAng",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t\tint b = sc.nextInt();\n\t\tint h = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tdouble aAng = h * 30 + m * 0.5;\n\t\tdouble bAng = m * 6;\n\t\tSystem.out.println(\n\t\t\t\tMath.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double aAng = h * 30 + m * 0.5;
double bAng = m * 6;
System.out.println(
Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2*a * b * Math.cos(Math.toRadians(Math.abs(360-(aAng - bAng))))));
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
2,
2,
2,
13,
17,
17,
2,
13,
17,
41,
13,
2,
2,
13,
17,
17,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
2,
17,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
4,
13,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
17,
2,
17,
4,
13,
2,
13,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
377,
11
],
[
377,
12
],
[
12,
13
],
[
377,
14
],
[
14,
15
],
[
377,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
18,
20
],
[
377,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
23,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
23,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
23,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
23,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
23,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
87,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
23,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
23,
104
],
[
104,
105
],
[
104,
106
],
[
377,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
113,
115
],
[
109,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
109,
121
],
[
121,
122
],
[
121,
123
],
[
109,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
124,
129
],
[
129,
130
],
[
109,
131
],
[
131,
132
],
[
132,
133
],
[
109,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
140,
144
],
[
139,
145
],
[
107,
146
],
[
146,
147
],
[
377,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
148,
155
],
[
155,
156
],
[
377,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
160,
163
],
[
157,
164
],
[
164,
165
],
[
377,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
174,
175
],
[
377,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
180,
183
],
[
183,
184
],
[
184,
185
],
[
377,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
190,
193
],
[
193,
194
],
[
194,
195
],
[
377,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
377,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
207,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
212,
215
],
[
215,
216
],
[
215,
217
],
[
203,
218
],
[
218,
219
],
[
203,
220
],
[
220,
221
],
[
377,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
226,
231
],
[
231,
232
],
[
231,
233
],
[
231,
234
],
[
234,
235
],
[
234,
236
],
[
222,
237
],
[
237,
238
],
[
222,
239
],
[
239,
240
],
[
377,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
245,
249
],
[
245,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
256,
258
],
[
241,
259
],
[
259,
260
],
[
377,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
264,
266
],
[
263,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
271,
273
],
[
267,
274
],
[
274,
275
],
[
274,
276
],
[
267,
277
],
[
277,
278
],
[
278,
279
],
[
267,
280
],
[
281,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
284,
287
],
[
287,
288
],
[
287,
289
],
[
281,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
292,
294
],
[
281,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
295,
299
],
[
299,
300
],
[
299,
301
],
[
281,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
263,
307
],
[
307,
308
],
[
308,
309
],
[
307,
310
],
[
261,
311
],
[
311,
312
],
[
261,
313
],
[
313,
314
],
[
377,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
315,
319
],
[
319,
320
],
[
315,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
324,
325
],
[
324,
326
],
[
315,
327
],
[
327,
328
],
[
327,
329
],
[
329,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
330,
339
],
[
339,
340
],
[
340,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
340,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
329,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
315,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
358,
359
],
[
358,
360
],
[
357,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
364,
365
],
[
365,
366
],
[
366,
367
],
[
361,
368
],
[
368,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
372,
373
],
[
357,
374
],
[
374,
375
],
[
0,
376
],
[
376,
377
],
[
376,
378
]
] |
[
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n \npublic class Main\n{\n public static void process()throws IOException\n {\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main\n{\n public static void process()throws IOException\n {\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main",
"static FastReader sc;",
"sc",
"static PrintWriter out;",
"out",
"static long mod=(long)1e9+7l;",
"mod",
"(long)1e9+7l",
"(long)1e9",
"7l",
"public static void process()throws IOException\n {\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }",
"process",
"{\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }",
"int a=ni()",
"a",
"ni()",
"ni",
"b=ni()",
"b",
"ni()",
"ni",
"h=ni()",
"h",
"ni()",
"ni",
"m=ni();",
"m",
"ni()",
"ni",
"double ang_h=h/12.0d*360.0d+m/2.0d",
"ang_h",
"h/12.0d*360.0d+m/2.0d",
"h/12.0d*360.0d",
"h/12.0d",
"h",
"12.0d",
"360.0d",
"m/2.0d",
"m",
"2.0d",
"ang_m=m/60.0d*360.0d;",
"ang_m",
"m/60.0d*360.0d",
"m/60.0d",
"m",
"60.0d",
"360.0d",
"double ang=Math.abs(ang_h-ang_m);",
"ang",
"Math.abs(ang_h-ang_m)",
"Math.abs",
"Math",
"ang_h-ang_m",
"ang_h",
"ang_m",
"ang=Math.min(360-ang,ang)",
"ang",
"Math.min(360-ang,ang)",
"Math.min",
"Math",
"360-ang",
"360",
"ang",
"ang",
"double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));",
"res",
"a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang))",
"a*a+b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"2*a*b*Math.cos(Math.toRadians(ang))",
"b",
"2*a*b*Math.cos(Math.toRadians(ang))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(ang))",
"Math.cos",
"Math",
"Math.toRadians(ang)",
"Math.toRadians",
"Math",
"ang",
"res=Math.sqrt(res)",
"res",
"Math.sqrt(res)",
"Math.sqrt",
"Math",
"res",
"pn(res)",
"pn",
"res",
"public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"main",
"{\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"sc=new FastReader()",
"sc",
"new FastReader()",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"int t=1;",
"t",
"1",
"while(t-->0)\n process();",
"t-->0",
"t--",
"t",
"0",
"process()",
"process",
"out.flush()",
"out.flush",
"out",
"System.err.println(System.currentTimeMillis()-s+\"ms\")",
"System.err.println",
"System.err",
"System",
"System.err",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"String[]args",
"args",
"static void pn(Object o){out.println(o);}",
"pn",
"{out.println(o);}",
"out.println(o)",
"out.println",
"out",
"o",
"Object o",
"o",
"static void p(Object o){out.print(o);}",
"p",
"{out.print(o);}",
"out.print(o)",
"out.print",
"out",
"o",
"Object o",
"o",
"static int ni()throws IOException{return Integer.parseInt(sc.next());}",
"ni",
"{return Integer.parseInt(sc.next());}",
"return Integer.parseInt(sc.next());",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"static long nl()throws IOException{return Long.parseLong(sc.next());}",
"nl",
"{return Long.parseLong(sc.next());}",
"return Long.parseLong(sc.next());",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"static double nd()throws IOException{return Double.parseDouble(sc.next());}",
"nd",
"{return Double.parseDouble(sc.next());}",
"return Double.parseDouble(sc.next());",
"Double.parseDouble(sc.next())",
"Double.parseDouble",
"Double",
"sc.next()",
"sc.next",
"sc",
"static String nln()throws IOException{return sc.nextLine();}",
"nln",
"{return sc.nextLine();}",
"return sc.nextLine();",
"sc.nextLine()",
"sc.nextLine",
"sc",
"static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}",
"bit",
"{return (n==0)?0:(1+bit(n&(n-1)));}",
"return (n==0)?0:(1+bit(n&(n-1)));",
"(n==0)?0:(1+bit(n&(n-1)))",
"(n==0)",
"n",
"0",
"0",
"(1+bit(n&(n-1)))",
"1",
"bit(n&(n-1))",
"bit",
"n&(n-1)",
"n",
"(n-1)",
"n",
"1",
"long n",
"n",
"static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }",
"r_sort",
"{\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }",
"Random r = new Random();",
"r",
"new Random()",
"for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"int i = n-1;",
"int i = n-1;",
"i",
"n-1",
"n",
"1",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"{ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n }",
"int j = r.nextInt(i+1);",
"j",
"r.nextInt(i+1)",
"r.nextInt",
"r",
"i+1",
"i",
"1",
"T temp = arr[i];",
"temp",
"arr[i]",
"arr",
"i",
"arr[i] = arr[j]",
"arr[i]",
"arr",
"i",
"arr[j]",
"arr",
"j",
"arr[j] = temp",
"arr[j]",
"arr",
"j",
"temp",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"T arr[]",
"arr",
"int n",
"n",
" static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n }",
"FastReader",
"{ \n br = new BufferedReader(new InputStreamReader(System.in)); \n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); }",
"catch (IOException e){ e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ st = new StringTokenizer(br.readLine()); }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }",
"catch (IOException e) { e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ str = br.readLine(); }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{\n public static void process()throws IOException\n {\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"public class Main\n{\n public static void process()throws IOException\n {\n int a=ni(),b=ni(),h=ni(),m=ni();\n \n double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;\n double ang=Math.abs(ang_h-ang_m);\n ang=Math.min(360-ang,ang);\n // System.out.println(\"pos h and m \"+ang_h+\" \"+ang_m);\n // System.out.println(\"ang \"+ang);\n double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));\n res=Math.sqrt(res);\n pn(res);\n }\n \n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new FastReader();\n \n long s = System.currentTimeMillis();\n int t=1;\n // t=ni();\n while(t-->0)\n process();\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n \n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static int ni()throws IOException{return Integer.parseInt(sc.next());}\n static long nl()throws IOException{return Long.parseLong(sc.next());}\n static double nd()throws IOException{return Double.parseDouble(sc.next());}\n static String nln()throws IOException{return sc.nextLine();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n \n static long mod=(long)1e9+7l;\n \n static<T> void r_sort(T arr[],int n){\n Random r = new Random(); \n for (int i = n-1; i > 0; i--){ \n int j = r.nextInt(i+1); \n \n T temp = arr[i]; \n arr[i] = arr[j]; \n arr[j] = temp; \n } \n Arrays.sort(arr); \n }\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main"
] |
import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
public static void process()throws IOException
{
int a=ni(),b=ni(),h=ni(),m=ni();
double ang_h=h/12.0d*360.0d+m/2.0d,ang_m=m/60.0d*360.0d;
double ang=Math.abs(ang_h-ang_m);
ang=Math.min(360-ang,ang);
// System.out.println("pos h and m "+ang_h+" "+ang_m);
// System.out.println("ang "+ang);
double res=a*a+b*b-2*a*b*Math.cos(Math.toRadians(ang));
res=Math.sqrt(res);
pn(res);
}
static FastReader sc;
static PrintWriter out;
public static void main(String[]args)throws IOException
{
out = new PrintWriter(System.out);
sc=new FastReader();
long s = System.currentTimeMillis();
int t=1;
// t=ni();
while(t-->0)
process();
out.flush();
System.err.println(System.currentTimeMillis()-s+"ms");
}
static void pn(Object o){out.println(o);}
static void p(Object o){out.print(o);}
static int ni()throws IOException{return Integer.parseInt(sc.next());}
static long nl()throws IOException{return Long.parseLong(sc.next());}
static double nd()throws IOException{return Double.parseDouble(sc.next());}
static String nln()throws IOException{return sc.nextLine();}
static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
static long mod=(long)1e9+7l;
static<T> void r_sort(T arr[],int n){
Random r = new Random();
for (int i = n-1; i > 0; i--){
int j = r.nextInt(i+1);
T temp = arr[i];
arr[i] = arr[j];
arr[j] = temp;
}
Arrays.sort(arr);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
br = new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while (st == null || !st.hasMoreElements()){
try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); }
}
return st.nextToken();
}
String nextLine(){
String str = "";
try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }
return str;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
2,
2,
2,
17,
13,
2,
13,
17,
2,
17,
13,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
8,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
56,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
74,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
8,
89
],
[
89,
90
],
[
90,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }\n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }\n \n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = Integer.parseInt(sc.next());",
"A",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int B = Integer.parseInt(sc.next());",
"B",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int H = Integer.parseInt(sc.next());",
"H",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int M = Integer.parseInt(sc.next());",
"M",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));",
"x2",
"A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)))",
"A*A + B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)))",
"B",
"2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)))",
"2",
"A",
"B",
"(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)))",
"Math.cos",
"Math",
"Math.toRadians(30*H+(double)(M/2.0)-6*M)",
"Math.toRadians",
"Math",
"30*H+(double)(M/2.0)-6*M",
"30*H+(double)(M/2.0)",
"30*H",
"30",
"H",
"(double)(M/2.0)",
"M",
"2.0",
"6*M",
"6",
"M",
"double ans = Math.sqrt(x2);",
"ans",
"Math.sqrt(x2)",
"Math.sqrt",
"Math",
"x2",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String args[]",
"args",
"public class Main {\n\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }\n \n}",
"public class Main {\n\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n int A = Integer.parseInt(sc.next());\n int B = Integer.parseInt(sc.next());\n int H = Integer.parseInt(sc.next());\n int M = Integer.parseInt(sc.next());\n\n double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));\n double ans = Math.sqrt(x2);\n \n System.out.println(ans);\n\n sc.close();\n }\n \n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int A = Integer.parseInt(sc.next());
int B = Integer.parseInt(sc.next());
int H = Integer.parseInt(sc.next());
int M = Integer.parseInt(sc.next());
double x2 = A*A + B*B -2*A*B*(Math.cos(Math.toRadians(30*H+(double)(M/2.0)-6*M)));
double ans = Math.sqrt(x2);
System.out.println(ans);
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
13,
13,
41,
13,
13,
41,
13,
2,
13,
17,
41,
13,
2,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
13,
0,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
39,
41
],
[
8,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
8,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
8,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
8,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
8,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int D = (60 * h) + m;",
"D",
"(60 * h) + m",
"(60 * h)",
"60",
"h",
"m",
"double dd = (double)D;",
"dd",
"(double)D",
"double a1 = dd / (double)2;",
"a1",
"dd / (double)2",
"dd",
"(double)2",
"double a2 = dd * ((double)6);",
"a2",
"dd * ((double)6)",
"dd",
"((double)6)",
"a1 = (a1 % 360)",
"a1",
"(a1 % 360)",
"a1",
"360",
"a2 = (a2 % 360)",
"a2",
"(a2 % 360)",
"a2",
"360",
"double a3 = Math.abs(a1 - a2);",
"a3",
"Math.abs(a1 - a2)",
"Math.abs",
"Math",
"a1 - a2",
"a1",
"a2",
"double a3r = Math.toRadians(a3);",
"a3r",
"Math.toRadians(a3)",
"Math.toRadians",
"Math",
"a3",
"double cos = Math.cos(a3r);",
"cos",
"Math.cos(a3r)",
"Math.cos",
"Math",
"a3r",
"double ans = (a * a) + (b * b) - (2 * a * b * cos);",
"ans",
"(a * a) + (b * b) - (2 * a * b * cos)",
"(a * a) + (b * b)",
"(a * a)",
"a",
"a",
"(b * b)",
"b",
"b",
"(2 * a * b * cos)",
"b",
"2 * a * b * cos",
"2",
"a",
"b",
"cos",
"ans = Math.sqrt(ans)",
"ans",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n double a = sc.nextDouble();\n double b = sc.nextDouble();\n int h = sc.nextInt();\n int m = sc.nextInt();\n int D = (60 * h) + m;\n double dd = (double)D;\n double a1 = dd / (double)2;\n double a2 = dd * ((double)6);\n a1 = (a1 % 360);\n a2 = (a2 % 360);\n double a3 = Math.abs(a1 - a2);\n double a3r = Math.toRadians(a3);\n double cos = Math.cos(a3r);\n double ans = (a * a) + (b * b) - (2 * a * b * cos);\n ans = Math.sqrt(ans); \n System.out.println(ans);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
int h = sc.nextInt();
int m = sc.nextInt();
int D = (60 * h) + m;
double dd = (double)D;
double a1 = dd / (double)2;
double a2 = dd * ((double)6);
a1 = (a1 % 360);
a2 = (a2 % 360);
double a3 = Math.abs(a1 - a2);
double a3r = Math.toRadians(a3);
double cos = Math.cos(a3r);
double ans = (a * a) + (b * b) - (2 * a * b * cos);
ans = Math.sqrt(ans);
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
17,
18,
13,
13,
2,
2,
13,
17,
2,
2,
2,
17,
13,
13,
17,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
17,
2,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
86,
8
],
[
86,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
38,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
68,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
11,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
9,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
] |
[
"import java.util.*;\nimport java.lang.Math;\n\npublic class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.Math;",
"Math",
"java.lang",
"public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }\n}",
"Main",
"public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }",
"main",
"{\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt()",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt()",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));",
"theta",
"(double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0))",
"(double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0))",
"(double)2",
"Math.PI",
"Math",
"Math.PI",
"((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0))",
"(double)M / 60.0",
"(double)M",
"60.0",
"((60.0 * (double)H + M) / 720.0)",
"(60.0 * (double)H + M)",
"60.0 * (double)H",
"60.0",
"(double)H",
"M",
"720.0",
"double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));",
"sqr",
"Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta))",
"Math.sqrt",
"Math",
"(double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta)",
"(double)(A*A + B * B)",
"A*A",
"A",
"A",
"B * B",
"B",
"B",
"2 * (double)(A * B) * Math.cos(theta)",
"2 * (double)(A * B) * Math.cos(theta)",
"2",
"(double)(A * B)",
"A",
"B",
"Math.cos(theta)",
"Math.cos",
"Math",
"theta",
"System.out.println(sqr)",
"System.out.println",
"System.out",
"System",
"System.out",
"sqr",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n \n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt(), B = sc.nextInt();\n int H = sc.nextInt(), M = sc.nextInt();\n \n double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));\n \n double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));\n \n System.out.println(sqr);\n }\n}",
"Main"
] |
import java.util.*;
import java.lang.Math;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt(), B = sc.nextInt();
int H = sc.nextInt(), M = sc.nextInt();
double theta = (double)2 * Math.PI * ((double)M / 60.0 - ((60.0 * (double)H + M) / 720.0));
double sqr = Math.sqrt((double)(A*A + B * B) - 2 * (double)(A * B) * Math.cos(theta));
System.out.println(sqr);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
17,
2,
2,
13,
17,
13,
41,
13,
2,
17,
13,
41,
13,
4,
18,
13,
2,
13,
13,
0,
13,
4,
18,
13,
2,
17,
13,
13,
0,
13,
4,
18,
13,
13,
41,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
17,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
4,
13,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
36,
13,
29,
17,
14,
2,
2,
13,
17,
2,
4,
13,
4,
18,
13,
29,
17,
41,
13,
13,
29,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
295,
8
],
[
295,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
11,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
11,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
11,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
11,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
11,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
11,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
11,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
95,
99
],
[
9,
100
],
[
100,
101
],
[
9,
102
],
[
102,
103
],
[
295,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
106,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
106,
117
],
[
117,
118
],
[
117,
119
],
[
106,
120
],
[
120,
121
],
[
120,
122
],
[
106,
123
],
[
123,
124
],
[
123,
125
],
[
123,
126
],
[
106,
127
],
[
127,
128
],
[
128,
129
],
[
104,
130
],
[
130,
131
],
[
295,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
132,
136
],
[
136,
137
],
[
132,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
138,
147
],
[
147,
148
],
[
132,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
152,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
162,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
151,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
132,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
180,
183
],
[
183,
184
],
[
132,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
189,
192
],
[
192,
193
],
[
132,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
201,
206
],
[
206,
207
],
[
206,
208
],
[
201,
209
],
[
209,
210
],
[
210,
211
],
[
201,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
213,
217
],
[
217,
218
],
[
196,
219
],
[
219,
220
],
[
194,
221
],
[
221,
222
],
[
0,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
223,
227
],
[
227,
228
],
[
223,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
231,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
229,
242
],
[
242,
243
],
[
229,
244
],
[
244,
245
],
[
223,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
249,
253
],
[
253,
254
],
[
248,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
261,
262
],
[
260,
263
],
[
263,
264
],
[
264,
265
],
[
255,
266
],
[
266,
267
],
[
248,
268
],
[
268,
269
],
[
268,
270
],
[
248,
271
],
[
271,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
275,
277
],
[
272,
278
],
[
278,
279
],
[
278,
280
],
[
280,
281
],
[
280,
282
],
[
246,
283
],
[
283,
284
],
[
223,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
289,
292
],
[
289,
293
],
[
0,
294
],
[
294,
295
],
[
294,
296
]
] |
[
"import java.io.*;\nimport java.util.*;\npublic class Main {\n\n private static void solver(InputReader sc, PrintWriter out) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }\n public static void main(String[] args) throws Exception {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong() {\n return Long.parseLong(next());\n }\n public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }\n }\n}\nclass Pair{\n int x,y;\n Pair(int x, int y){\n this.x = x;\n this.y = y;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Pair pair = (Pair) o;\n return x == pair.x &&\n y == pair.y;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(x, y);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n private static void solver(InputReader sc, PrintWriter out) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }\n public static void main(String[] args) throws Exception {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong() {\n return Long.parseLong(next());\n }\n public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }\n }\n}",
"Main",
"private static void solver(InputReader sc, PrintWriter out) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }",
"solver",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int h = sc.nextInt();",
"h",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int m = sc.nextInt();",
"m",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double hour_angle = (0.5 * (h*60 + m));",
"hour_angle",
"(0.5 * (h*60 + m))",
"0.5",
"(h*60 + m)",
"h*60",
"h",
"60",
"m",
"int minute_angle = (6*m);",
"minute_angle",
"(6*m)",
"6",
"m",
"double angle = Math.abs(hour_angle - minute_angle);",
"angle",
"Math.abs(hour_angle - minute_angle)",
"Math.abs",
"Math",
"hour_angle - minute_angle",
"hour_angle",
"minute_angle",
"angle = Math.min(360-angle, angle)",
"angle",
"Math.min(360-angle, angle)",
"Math.min",
"Math",
"360-angle",
"360",
"angle",
"angle",
"angle = Math.toRadians(angle)",
"angle",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));",
"ans",
"(a *a) + (b*b) - (2 *a * b * (Math.cos(angle)))",
"(a *a) + (b*b)",
"(a *a)",
"a",
"a",
"(b*b)",
"b",
"b",
"(2 *a * b * (Math.cos(angle)))",
"b",
"2 *a * b * (Math.cos(angle))",
"2",
"a",
"b",
"(Math.cos(angle))",
"Math.cos",
"Math",
"angle",
"ans = Math.sqrt(ans)",
"ans",
"Math.sqrt(ans)",
"Math.sqrt",
"Math",
"ans",
"out.printf(\"%.10f\",ans)",
"out.printf",
"out",
"\"%.10f\"",
"ans",
"InputReader sc",
"sc",
"PrintWriter out",
"out",
"public static void main(String[] args) throws Exception {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"solver(in,out)",
"solver",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong() {\n return Long.parseLong(next());\n }\n public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }\n }",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"InputReader",
"{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(stream), 32768)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32768)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }",
"readIntArray",
"{\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }",
"int arr[] = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<n;i++) arr[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i] = nextInt();",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"class Pair{\n int x,y;\n Pair(int x, int y){\n this.x = x;\n this.y = y;\n }\n\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Pair pair = (Pair) o;\n return x == pair.x &&\n y == pair.y;\n }\n\n @Override\n public int hashCode() {\n return Objects.hash(x, y);\n }\n}",
"Pair",
"int x",
"x",
"y;",
"y",
"Pair(int x, int y){\n this.x = x;\n this.y = y;\n }",
"Pair",
"{\n this.x = x;\n this.y = y;\n }",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"int x",
"x",
"int y",
"y",
"@Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Pair pair = (Pair) o;\n return x == pair.x &&\n y == pair.y;\n }",
"equals",
"{\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n Pair pair = (Pair) o;\n return x == pair.x &&\n y == pair.y;\n }",
"if (this == o) return true;",
"this == o",
"this",
"o",
"return true;",
"true",
"if (o == null || getClass() != o.getClass()) return false;",
"o == null || getClass() != o.getClass()",
"o == null",
"o",
"null",
"getClass() != o.getClass()",
"getClass()",
"getClass",
"o.getClass()",
"o.getClass",
"o",
"return false;",
"false",
"Pair pair = (Pair) o;",
"pair",
"(Pair) o",
"return x == pair.x &&\n y == pair.y;",
"x == pair.x &&\n y == pair.y",
"x == pair.x",
"x",
"pair.x",
"pair",
"pair.x",
"y == pair.y",
"y",
"pair.y",
"pair",
"pair.y",
"Object o",
"o",
"@Override\n public int hashCode() {\n return Objects.hash(x, y);\n }",
"hashCode",
"{\n return Objects.hash(x, y);\n }",
"return Objects.hash(x, y);",
"Objects.hash(x, y)",
"Objects.hash",
"Objects",
"x",
"y",
"public class Main {\n\n private static void solver(InputReader sc, PrintWriter out) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }\n public static void main(String[] args) throws Exception {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong() {\n return Long.parseLong(next());\n }\n public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }\n }\n}",
"public class Main {\n\n private static void solver(InputReader sc, PrintWriter out) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n int h = sc.nextInt();\n int m = sc.nextInt();\n double hour_angle = (0.5 * (h*60 + m));\n int minute_angle = (6*m);\n double angle = Math.abs(hour_angle - minute_angle);\n angle = Math.min(360-angle, angle);\n angle = Math.toRadians(angle);\n double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));\n ans = Math.sqrt(ans);\n out.printf(\"%.10f\",ans);\n }\n public static void main(String[] args) throws Exception {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n solver(in,out);\n out.close();\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n public long nextLong() {\n return Long.parseLong(next());\n }\n public int[] readIntArray(int n){\n int arr[] = new int[n];\n for(int i=0;i<n;i++) arr[i] = nextInt();\n return arr;\n }\n }\n}",
"Main"
] |
import java.io.*;
import java.util.*;
public class Main {
private static void solver(InputReader sc, PrintWriter out) {
int a = sc.nextInt();
int b = sc.nextInt();
int h = sc.nextInt();
int m = sc.nextInt();
double hour_angle = (0.5 * (h*60 + m));
int minute_angle = (6*m);
double angle = Math.abs(hour_angle - minute_angle);
angle = Math.min(360-angle, angle);
angle = Math.toRadians(angle);
double ans = (a *a) + (b*b) - (2 *a * b * (Math.cos(angle)));
ans = Math.sqrt(ans);
out.printf("%.10f",ans);
}
public static void main(String[] args) throws Exception {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
solver(in,out);
out.close();
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
public int[] readIntArray(int n){
int arr[] = new int[n];
for(int i=0;i<n;i++) arr[i] = nextInt();
return arr;
}
}
}
class Pair{
int x,y;
Pair(int x, int y){
this.x = x;
this.y = y;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Pair pair = (Pair) o;
return x == pair.x &&
y == pair.y;
}
@Override
public int hashCode() {
return Objects.hash(x, y);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
17,
13,
17,
41,
13,
4,
18,
13,
2,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
4,
18,
13,
13,
14,
2,
4,
18,
13,
17,
0,
13,
4,
18,
4,
18,
13,
17,
13,
0,
13,
4,
18,
4,
18,
13,
18,
13,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
17,
17,
18,
13,
13,
41,
13,
2,
2,
13,
13,
2,
13,
13,
0,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
0,
13,
4,
18,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
2,
17,
13,
4,
18,
18,
13,
13,
4,
18,
13,
4,
18,
4,
18,
4,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
29,
4,
18,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
218,
11
],
[
218,
12
],
[
12,
13
],
[
218,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
16,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
16,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
16,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
16,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
53,
55
],
[
16,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
16,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
78,
84
],
[
16,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
87,
95
],
[
16,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
98,
105
],
[
98,
106
],
[
106,
107
],
[
106,
108
],
[
16,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
16,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
127,
128
],
[
16,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
131,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
143,
144
],
[
143,
145
],
[
16,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
146,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
156,
162
],
[
14,
163
],
[
163,
164
],
[
218,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
167,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
165,
178
],
[
178,
179
],
[
218,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
218,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
194,
195
],
[
195,
196
],
[
218,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
204,
205
],
[
205,
206
],
[
218,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
214,
215
],
[
215,
216
],
[
0,
217
],
[
217,
218
],
[
217,
219
]
] |
[
"\n\nimport java.math.BigDecimal;\nimport java.math.RoundingMode;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}\n\n\n\tpublic static long d(long n) {\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.RoundingMode;",
"RoundingMode",
"java.math",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}\n\n\n\tpublic static long d(long n) {\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main",
"static Scanner scanner;",
"scanner",
"public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}",
"main",
"{\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}",
"scanner = new Scanner(System.in)",
"scanner",
"new Scanner(System.in)",
"double a=gd();",
"a",
"gd()",
"gd",
"double b=gd();",
"b",
"gd()",
"gd",
"double h=gd();",
"h",
"gd()",
"gd",
"double m=gd();",
"m",
"gd()",
"gd",
"BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);",
"hk",
"BigDecimal.valueOf((h*60+m)/2)",
"BigDecimal.valueOf",
"BigDecimal",
"(h*60+m)/2",
"(h*60+m)",
"h*60",
"h",
"60",
"m",
"2",
"BigDecimal mk=BigDecimal.valueOf(m*6);",
"mk",
"BigDecimal.valueOf(m*6)",
"BigDecimal.valueOf",
"BigDecimal",
"m*6",
"m",
"6",
"BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));",
"k",
"BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()))",
"BigDecimal.valueOf",
"BigDecimal",
"Math.abs(hk.subtract(mk).doubleValue())",
"Math.abs",
"Math",
"hk.subtract(mk).doubleValue()",
"hk.subtract(mk).doubleValue",
"hk.subtract(mk)",
"hk.subtract",
"hk",
"mk",
"if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);",
"k.doubleValue()>180",
"k.doubleValue()",
"k.doubleValue",
"k",
"180",
"k=BigDecimal.valueOf(360).subtract(k)",
"k",
"BigDecimal.valueOf(360).subtract(k)",
"BigDecimal.valueOf(360).subtract",
"BigDecimal.valueOf(360)",
"BigDecimal.valueOf",
"BigDecimal",
"360",
"k",
"k=BigDecimal.valueOf(Math.PI).multiply(k)",
"k",
"BigDecimal.valueOf(Math.PI).multiply(k)",
"BigDecimal.valueOf(Math.PI).multiply",
"BigDecimal.valueOf(Math.PI)",
"BigDecimal.valueOf",
"BigDecimal",
"Math.PI",
"Math",
"Math.PI",
"k",
"k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP)",
"k",
"k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP)",
"k.divide",
"k",
"BigDecimal.valueOf(180)",
"BigDecimal.valueOf",
"BigDecimal",
"180",
"11",
"RoundingMode.HALF_UP",
"RoundingMode",
"RoundingMode.HALF_UP",
"double s=a*a+b*b;",
"s",
"a*a+b*b",
"a*a",
"a",
"a",
"b*b",
"b",
"b",
"k=BigDecimal.valueOf(Math.cos(k.doubleValue()))",
"k",
"BigDecimal.valueOf(Math.cos(k.doubleValue()))",
"BigDecimal.valueOf",
"BigDecimal",
"Math.cos(k.doubleValue())",
"Math.cos",
"Math",
"k.doubleValue()",
"k.doubleValue",
"k",
"k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b))",
"k",
"k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b))",
"k.multiply(BigDecimal.valueOf(a)).multiply",
"k.multiply(BigDecimal.valueOf(a))",
"k.multiply",
"k",
"BigDecimal.valueOf(a)",
"BigDecimal.valueOf",
"BigDecimal",
"a",
"BigDecimal.valueOf(2*b)",
"BigDecimal.valueOf",
"BigDecimal",
"2*b",
"2",
"b",
"System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()))",
"System.out.print",
"System.out",
"System",
"System.out",
"Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue())",
"Math.sqrt",
"Math",
"BigDecimal.valueOf(s).subtract(k).doubleValue()",
"BigDecimal.valueOf(s).subtract(k).doubleValue",
"BigDecimal.valueOf(s).subtract(k)",
"BigDecimal.valueOf(s).subtract",
"BigDecimal.valueOf(s)",
"BigDecimal.valueOf",
"BigDecimal",
"s",
"k",
"String[] args",
"args",
"public static long d(long n) {\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}",
"d",
"{\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}",
"String a=String.valueOf(n);",
"a",
"String.valueOf(n)",
"String.valueOf",
"String",
"n",
"return (long)a.length();",
"(long)a.length()",
"a.length",
"a",
"long n",
"n",
"// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}",
"gs",
"{\n\t\treturn scanner.next();\n\t}",
"return scanner.next();",
"scanner.next()",
"scanner.next",
"scanner",
"// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"gi",
"{\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"return Integer.parseInt(scanner.next());",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"gl",
"{\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"return Long.parseLong(scanner.next());",
"Long.parseLong(scanner.next())",
"Long.parseLong",
"Long",
"scanner.next()",
"scanner.next",
"scanner",
"// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"gd",
"{\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"return Double.parseDouble(scanner.next());",
"Double.parseDouble(scanner.next())",
"Double.parseDouble",
"Double",
"scanner.next()",
"scanner.next",
"scanner",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}\n\n\n\tpublic static long d(long n) {\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n double a=gd();\n double b=gd();\n double h=gd();\n double m=gd();\n\n //System.out.println(\"No\");\n\n BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);\n BigDecimal mk=BigDecimal.valueOf(m*6);\n BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));\n if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);\n k=BigDecimal.valueOf(Math.PI).multiply(k);\n k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);\n double s=a*a+b*b;\n k=BigDecimal.valueOf(Math.cos(k.doubleValue()));\n k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));\n\n System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));\n\t}\n\n\n\tpublic static long d(long n) {\n\t\tString a=String.valueOf(n);\n\t\treturn (long)a.length();\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main"
] |
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Scanner;
public class Main {
static Scanner scanner;
public static void main(String[] args) {
scanner = new Scanner(System.in);
double a=gd();
double b=gd();
double h=gd();
double m=gd();
//System.out.println("No");
BigDecimal hk=BigDecimal.valueOf((h*60+m)/2);
BigDecimal mk=BigDecimal.valueOf(m*6);
BigDecimal k=BigDecimal.valueOf(Math.abs(hk.subtract(mk).doubleValue()));
if (k.doubleValue()>180) k=BigDecimal.valueOf(360).subtract(k);
k=BigDecimal.valueOf(Math.PI).multiply(k);
k=k.divide(BigDecimal.valueOf(180), 11, RoundingMode.HALF_UP);
double s=a*a+b*b;
k=BigDecimal.valueOf(Math.cos(k.doubleValue()));
k=k.multiply(BigDecimal.valueOf(a)).multiply(BigDecimal.valueOf(2*b));
System.out.print(Math.sqrt(BigDecimal.valueOf(s).subtract(k).doubleValue()));
}
public static long d(long n) {
String a=String.valueOf(n);
return (long)a.length();
}
// 文字列として入力を取得
public static String gs() {
return scanner.next();
}
// intとして入力を取得
public static int gi() {
return Integer.parseInt(scanner.next());
}
// longとして入力を取得
public static long gl() {
return Long.parseLong(scanner.next());
}
// doubleとして入力を取得
public static double gd() {
return Double.parseDouble(scanner.next());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
41,
13,
2,
2,
18,
13,
13,
17,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
2,
13,
17,
0,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
37,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
42,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
61,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
60,
72
],
[
74,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
82,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"Integer a = scanner.nextInt();",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Integer b = scanner.nextInt();",
"b",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Integer h = scanner.nextInt();",
"h",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"Integer m = scanner.nextInt();",
"m",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"double result;",
"result",
"double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);",
"rad",
"Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60)",
"Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60)",
"Math.PI",
"Math",
"Math.PI",
"2",
"((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60)",
"(double)h / 12 + ((double)m / 60) / 12",
"(double)h / 12",
"(double)h",
"12",
"((double)m / 60) / 12",
"((double)m / 60)",
"(double)m",
"60",
"12",
"(double)m / 60",
"(double)m",
"60",
"result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad))",
"result",
"Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad))",
"Math.sqrt",
"Math",
"Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad)",
"Math.pow(a,2) + Math.pow(b,2)",
"Math.pow(a,2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b,2)",
"Math.pow",
"Math",
"b",
"2",
"2*a*b*Math.cos(rad)",
"b",
"2*a*b*Math.cos(rad)",
"2",
"a",
"b",
"Math.cos(rad)",
"Math.cos",
"Math",
"rad",
"System.out.printf(\"%.20f\",result)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.20f\"",
"result",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n Integer a = scanner.nextInt();\n Integer b = scanner.nextInt();\n Integer h = scanner.nextInt();\n Integer m = scanner.nextInt();\n\n double result;\n\n double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);\n\n result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));\n\n System.out.printf(\"%.20f\",result);\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Integer a = scanner.nextInt();
Integer b = scanner.nextInt();
Integer h = scanner.nextInt();
Integer m = scanner.nextInt();
double result;
double rad = Math.PI * 2 * ((double)h / 12 + ((double)m / 60) / 12 - (double)m / 60);
result = Math.sqrt(Math.pow(a,2) + Math.pow(b,2) - 2*a*b*Math.cos(rad));
System.out.printf("%.20f",result);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
2,
2,
13,
17,
13,
0,
13,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
0,
13,
2,
17,
13,
0,
13,
2,
17,
13,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
0,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
2,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
129,
5
],
[
129,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
8,
38
],
[
38,
39
],
[
38,
40
],
[
8,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
44,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
8,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
8,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
8,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
8,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
8,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
123,
125
],
[
6,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int A = scan.nextInt();",
"A",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int B = scan.nextInt();",
"B",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int H = scan.nextInt();",
"H",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int M = scan.nextInt();",
"M",
"scan.nextInt()",
"scan.nextInt",
"scan",
"double ab = 0;",
"ab",
"0",
"double other = 0;",
"other",
"0",
"double longHand = 0;",
"longHand",
"0",
"double shortHand = 0;",
"shortHand",
"0",
"double angle = 0;",
"angle",
"0",
"int min = H * 60 + M;",
"min",
"H * 60 + M",
"H * 60",
"H",
"60",
"M",
"ab = Math.pow(A, 2) + Math.pow(B, 2)",
"ab",
"Math.pow(A, 2) + Math.pow(B, 2)",
"Math.pow(A, 2)",
"Math.pow",
"Math",
"A",
"2",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"longHand = 6 * M",
"longHand",
"6 * M",
"6",
"M",
"shortHand = 0.5 * min",
"shortHand",
"0.5 * min",
"0.5",
"min",
"angle = shortHand - longHand",
"angle",
"shortHand - longHand",
"shortHand",
"longHand",
"if (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}",
"H > 6",
"H",
"6",
"{\n\t\t\tangle = 360 - angle;\n\t\t}",
"angle = 360 - angle",
"angle",
"360 - angle",
"360",
"angle",
"other = (2 * A * B) * Math.cos(Math.toRadians(angle))",
"other",
"(2 * A * B) * Math.cos(Math.toRadians(angle))",
"(2 * A * B)",
"2 * A * B",
"2",
"A",
"B",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"if (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}",
"angle == 90.0",
"angle",
"90.0",
"{\n\t\t\tother = 0;\n\t\t}",
"other = 0",
"other",
"0",
"System.out.println(Math.sqrt(ab - other))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ab - other)",
"Math.sqrt",
"Math",
"ab - other",
"ab",
"other",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint A = scan.nextInt();\n\t\tint B = scan.nextInt();\n\t\tint H = scan.nextInt();\n\t\tint M = scan.nextInt();\n\t\tdouble ab = 0;\n\t\tdouble other = 0;\n\t\tdouble longHand = 0;\n\t\tdouble shortHand = 0;\n\t\tdouble angle = 0;\n\t\tint min = H * 60 + M;\n\t\t\n\t\tab = Math.pow(A, 2) + Math.pow(B, 2);\n\t\t\n\t\tlongHand = 6 * M;\n\t\tshortHand = 0.5 * min;\n\t\tangle = shortHand - longHand;\n\t\tif (H > 6) {\n\t\t\tangle = 360 - angle;\n\t\t}\n\t\t\n\t\tother = (2 * A * B) * Math.cos(Math.toRadians(angle));\n\t\tif (angle == 90.0) {\n\t\t\tother = 0;\n\t\t}\n\t\t\n\t\tSystem.out.println(Math.sqrt(ab - other));\n\t\t/*\n\t\tSystem.out.println(ab);\n\t\tSystem.out.println(other);\n\t\tSystem.out.println(Math.cos(Math.toRadians(90.0)));\n\t\tSystem.out.println(angle);\n\t\t*/\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int A = scan.nextInt();
int B = scan.nextInt();
int H = scan.nextInt();
int M = scan.nextInt();
double ab = 0;
double other = 0;
double longHand = 0;
double shortHand = 0;
double angle = 0;
int min = H * 60 + M;
ab = Math.pow(A, 2) + Math.pow(B, 2);
longHand = 6 * M;
shortHand = 0.5 * min;
angle = shortHand - longHand;
if (H > 6) {
angle = 360 - angle;
}
other = (2 * A * B) * Math.cos(Math.toRadians(angle));
if (angle == 90.0) {
other = 0;
}
System.out.println(Math.sqrt(ab - other));
/*
System.out.println(ab);
System.out.println(other);
System.out.println(Math.cos(Math.toRadians(90.0)));
System.out.println(angle);
*/
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
4,
13,
41,
13,
2,
2,
13,
17,
17,
41,
13,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
41,
13,
2,
2,
13,
18,
13,
13,
17,
41,
13,
2,
2,
13,
18,
13,
13,
17,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
182,
8
],
[
182,
9
],
[
9,
10
],
[
182,
11
],
[
11,
12
],
[
182,
13
],
[
13,
14
],
[
182,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
17,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
17,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
17,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
17,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
17,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
17,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
59,
65
],
[
17,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
17,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
17,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
17,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
17,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
17,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
124,
126
],
[
17,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
15,
133
],
[
133,
134
],
[
182,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
142,
143
],
[
182,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
151,
152
],
[
182,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
160,
161
],
[
182,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
165,
174
],
[
174,
175
],
[
174,
176
],
[
164,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
] |
[
"import java.util.*; \nimport java.io.*;\n\npublic class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main",
"static StringTokenizer st;",
"st",
"static BufferedReader br;",
"br",
"static PrintWriter out;",
"out",
"public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }",
"main",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int A = nextInt();",
"A",
"nextInt()",
"nextInt",
"int B = nextInt();",
"B",
"nextInt()",
"nextInt",
"int H = nextInt();",
"H",
"nextInt()",
"nextInt",
"int M = nextInt();",
"M",
"nextInt()",
"nextInt",
"double M_Angle = M * 360/60;",
"M_Angle",
"M * 360/60",
"M * 360",
"M",
"360",
"60",
"double H_Angle = H * 360/12 + (double)M * 30/60;",
"H_Angle",
"H * 360/12 + (double)M * 30/60",
"H * 360/12",
"H * 360",
"H",
"360",
"12",
"(double)M * 30/60",
"(double)M * 30",
"(double)M",
"30",
"60",
"double M_Angle1 = M_Angle * Math.PI / 180;",
"M_Angle1",
"M_Angle * Math.PI / 180",
"M_Angle * Math.PI",
"M_Angle",
"Math.PI",
"Math",
"Math.PI",
"180",
"double H_Angle1 = H_Angle * Math.PI / 180;",
"H_Angle1",
"H_Angle * Math.PI / 180",
"H_Angle * Math.PI",
"H_Angle",
"Math.PI",
"Math",
"Math.PI",
"180",
"double xM = B * Math.sin(M_Angle1);",
"xM",
"B * Math.sin(M_Angle1)",
"B",
"Math.sin(M_Angle1)",
"Math.sin",
"Math",
"M_Angle1",
"double yM = B * Math.cos(M_Angle1);",
"yM",
"B * Math.cos(M_Angle1)",
"B",
"Math.cos(M_Angle1)",
"Math.cos",
"Math",
"M_Angle1",
"double xH = A * Math.sin(H_Angle1);",
"xH",
"A * Math.sin(H_Angle1)",
"A",
"Math.sin(H_Angle1)",
"Math.sin",
"Math",
"H_Angle1",
"double yH = A * Math.cos(H_Angle1);",
"yH",
"A * Math.cos(H_Angle1)",
"A",
"Math.cos(H_Angle1)",
"Math.cos",
"Math",
"H_Angle1",
"double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));",
"ans",
"Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH))",
"Math.sqrt",
"Math",
"(xM-xH)*(xM-xH) + (yM-yH)*(yM-yH)",
"(xM-xH)*(xM-xH)",
"(xM-xH)",
"xM",
"xH",
"(xM-xH)",
"xM",
"xH",
"(yM-yH)*(yM-yH)",
"(yM-yH)",
"yM",
"yH",
"(yM-yH)",
"yM",
"yH",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine().trim())",
"st",
"new StringTokenizer(br.readLine().trim())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"public class Main{\n static StringTokenizer st;\n static BufferedReader br; \n static PrintWriter out;\n \n public static void main(String[] args) throws IOException {\n br = new BufferedReader(new InputStreamReader(System.in));\n \n int A = nextInt();\n int B = nextInt();\n int H = nextInt();\n int M = nextInt();\n \n double M_Angle = M * 360/60;\n double H_Angle = H * 360/12 + (double)M * 30/60;\n double M_Angle1 = M_Angle * Math.PI / 180;\n double H_Angle1 = H_Angle * Math.PI / 180;\n\n double xM = B * Math.sin(M_Angle1);\n double yM = B * Math.cos(M_Angle1);\n double xH = A * Math.sin(H_Angle1);\n double yH = A * Math.cos(H_Angle1);\n\n double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));\n \n System.out.println(ans);\n }\n \n \n public static int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n public static long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public static double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n static String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine().trim());\n return st.nextToken();\n }\n}",
"Main"
] |
import java.util.*;
import java.io.*;
public class Main{
static StringTokenizer st;
static BufferedReader br;
static PrintWriter out;
public static void main(String[] args) throws IOException {
br = new BufferedReader(new InputStreamReader(System.in));
int A = nextInt();
int B = nextInt();
int H = nextInt();
int M = nextInt();
double M_Angle = M * 360/60;
double H_Angle = H * 360/12 + (double)M * 30/60;
double M_Angle1 = M_Angle * Math.PI / 180;
double H_Angle1 = H_Angle * Math.PI / 180;
double xM = B * Math.sin(M_Angle1);
double yM = B * Math.cos(M_Angle1);
double xH = A * Math.sin(H_Angle1);
double yH = A * Math.cos(H_Angle1);
double ans = Math.sqrt((xM-xH)*(xM-xH) + (yM-yH)*(yM-yH));
System.out.println(ans);
}
public static int nextInt() throws IOException {
return Integer.parseInt(next());
}
public static long nextLong() throws IOException {
return Long.parseLong(next());
}
public static double nextDouble() throws IOException {
return Double.parseDouble(next());
}
static String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine().trim());
return st.nextToken();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
13,
41,
13,
2,
2,
2,
2,
17,
13,
17,
18,
13,
13,
17,
41,
13,
2,
2,
2,
2,
17,
13,
17,
18,
13,
13,
17,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
13,
41,
13,
2,
4,
18,
13,
2,
13,
13,
17,
4,
18,
13,
2,
13,
13,
17,
41,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
11,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
11,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
45,
51
],
[
51,
52
],
[
51,
53
],
[
44,
54
],
[
11,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
57,
67
],
[
11,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
11,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
11,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
11,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
11,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
103,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
11,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
119,
122
],
[
11,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
9,
129
],
[
129,
130
]
] |
[
"import java.util.*;\nimport java.math.*;\n\nclass Main{\npublic static void main(String[] args) {\n Scanner reader =new Scanner (System.in);\n int a =reader.nextInt();\n int b= reader.nextInt();\n int h=reader.nextInt();\n int m=reader.nextInt();\n\n int min =h*60+m;\n\n double aRad=(double)(0.5*min%360)*Math.PI/180;\n\n double bRad=(double)(6*min%360)*Math.PI/180;\n\n double ax=a*Math.sin(aRad);\n\n double ay=a*Math.cos(aRad);\n double bx=b*Math.sin(bRad);\n double by=b*Math.cos(bRad);\n\n double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);\n double lenans=Math.sqrt(len);\n System.out.println(lenans);\n\n\n\n\n}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"class Main{\npublic static void main(String[] args) {\n Scanner reader =new Scanner (System.in);\n int a =reader.nextInt();\n int b= reader.nextInt();\n int h=reader.nextInt();\n int m=reader.nextInt();\n\n int min =h*60+m;\n\n double aRad=(double)(0.5*min%360)*Math.PI/180;\n\n double bRad=(double)(6*min%360)*Math.PI/180;\n\n double ax=a*Math.sin(aRad);\n\n double ay=a*Math.cos(aRad);\n double bx=b*Math.sin(bRad);\n double by=b*Math.cos(bRad);\n\n double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);\n double lenans=Math.sqrt(len);\n System.out.println(lenans);\n\n\n\n\n}\n}",
"Main",
"public static void main(String[] args) {\n Scanner reader =new Scanner (System.in);\n int a =reader.nextInt();\n int b= reader.nextInt();\n int h=reader.nextInt();\n int m=reader.nextInt();\n\n int min =h*60+m;\n\n double aRad=(double)(0.5*min%360)*Math.PI/180;\n\n double bRad=(double)(6*min%360)*Math.PI/180;\n\n double ax=a*Math.sin(aRad);\n\n double ay=a*Math.cos(aRad);\n double bx=b*Math.sin(bRad);\n double by=b*Math.cos(bRad);\n\n double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);\n double lenans=Math.sqrt(len);\n System.out.println(lenans);\n\n\n\n\n}",
"main",
"{\n Scanner reader =new Scanner (System.in);\n int a =reader.nextInt();\n int b= reader.nextInt();\n int h=reader.nextInt();\n int m=reader.nextInt();\n\n int min =h*60+m;\n\n double aRad=(double)(0.5*min%360)*Math.PI/180;\n\n double bRad=(double)(6*min%360)*Math.PI/180;\n\n double ax=a*Math.sin(aRad);\n\n double ay=a*Math.cos(aRad);\n double bx=b*Math.sin(bRad);\n double by=b*Math.cos(bRad);\n\n double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);\n double lenans=Math.sqrt(len);\n System.out.println(lenans);\n\n\n\n\n}",
"Scanner reader =new Scanner (System.in);",
"reader",
"new Scanner (System.in)",
"int a =reader.nextInt();",
"a",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int b= reader.nextInt();",
"b",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int h=reader.nextInt();",
"h",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int m=reader.nextInt();",
"m",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int min =h*60+m;",
"min",
"h*60+m",
"h*60",
"h",
"60",
"m",
"double aRad=(double)(0.5*min%360)*Math.PI/180;",
"aRad",
"(double)(0.5*min%360)*Math.PI/180",
"(double)(0.5*min%360)*Math.PI",
"(double)(0.5*min%360)",
"0.5*min",
"0.5",
"min",
"360",
"Math.PI",
"Math",
"Math.PI",
"180",
"double bRad=(double)(6*min%360)*Math.PI/180;",
"bRad",
"(double)(6*min%360)*Math.PI/180",
"(double)(6*min%360)*Math.PI",
"(double)(6*min%360)",
"6*min",
"6",
"min",
"360",
"Math.PI",
"Math",
"Math.PI",
"180",
"double ax=a*Math.sin(aRad);",
"ax",
"a*Math.sin(aRad)",
"a",
"Math.sin(aRad)",
"Math.sin",
"Math",
"aRad",
"double ay=a*Math.cos(aRad);",
"ay",
"a*Math.cos(aRad)",
"a",
"Math.cos(aRad)",
"Math.cos",
"Math",
"aRad",
"double bx=b*Math.sin(bRad);",
"bx",
"b*Math.sin(bRad)",
"b",
"Math.sin(bRad)",
"Math.sin",
"Math",
"bRad",
"double by=b*Math.cos(bRad);",
"by",
"b*Math.cos(bRad)",
"b",
"Math.cos(bRad)",
"Math.cos",
"Math",
"bRad",
"double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);",
"len",
"Math.pow(ax-bx,2)+Math.pow(ay-by,2)",
"Math.pow(ax-bx,2)",
"Math.pow",
"Math",
"ax-bx",
"ax",
"bx",
"2",
"Math.pow(ay-by,2)",
"Math.pow",
"Math",
"ay-by",
"ay",
"by",
"2",
"double lenans=Math.sqrt(len);",
"lenans",
"Math.sqrt(len)",
"Math.sqrt",
"Math",
"len",
"System.out.println(lenans)",
"System.out.println",
"System.out",
"System",
"System.out",
"lenans",
"String[] args",
"args"
] |
import java.util.*;
import java.math.*;
class Main{
public static void main(String[] args) {
Scanner reader =new Scanner (System.in);
int a =reader.nextInt();
int b= reader.nextInt();
int h=reader.nextInt();
int m=reader.nextInt();
int min =h*60+m;
double aRad=(double)(0.5*min%360)*Math.PI/180;
double bRad=(double)(6*min%360)*Math.PI/180;
double ax=a*Math.sin(aRad);
double ay=a*Math.cos(aRad);
double bx=b*Math.sin(bRad);
double by=b*Math.cos(bRad);
double len=Math.pow(ax-bx,2)+Math.pow(ay-by,2);
double lenans=Math.sqrt(len);
System.out.println(lenans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
13,
2,
13,
17,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
2,
13,
2,
13,
17,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
13,
17,
41,
13,
2,
13,
4,
18,
13,
4,
18,
13,
2,
2,
17,
13,
17,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
8,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
45,
53
],
[
8,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
8,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
8,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
8,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
8,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
119,
120
],
[
118,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
122,
126
],
[
121,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
127,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double H = sc.nextDouble();",
"H",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double M = sc.nextDouble();",
"M",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"sc.close()",
"sc.close",
"sc",
"double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));",
"Hx",
"A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12))",
"A",
"Math.sin(Math.toRadians(360 * (H + M / 60) / 12))",
"Math.sin",
"Math",
"Math.toRadians(360 * (H + M / 60) / 12)",
"Math.toRadians",
"Math",
"360 * (H + M / 60) / 12",
"360 * (H + M / 60)",
"360",
"(H + M / 60)",
"H",
"M / 60",
"M",
"60",
"12",
"double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));",
"Hy",
"A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12))",
"A",
"Math.cos(Math.toRadians(360 * (H + M / 60) / 12))",
"Math.cos",
"Math",
"Math.toRadians(360 * (H + M / 60) / 12)",
"Math.toRadians",
"Math",
"360 * (H + M / 60) / 12",
"360 * (H + M / 60)",
"360",
"(H + M / 60)",
"H",
"M / 60",
"M",
"60",
"12",
"double Mx = B * Math.sin(Math.toRadians(360 * M / 60));",
"Mx",
"B * Math.sin(Math.toRadians(360 * M / 60))",
"B",
"Math.sin(Math.toRadians(360 * M / 60))",
"Math.sin",
"Math",
"Math.toRadians(360 * M / 60)",
"Math.toRadians",
"Math",
"360 * M / 60",
"360 * M",
"360",
"M",
"60",
"double My = B * Math.cos(Math.toRadians(360 * M / 60));",
"My",
"B * Math.cos(Math.toRadians(360 * M / 60))",
"B",
"Math.cos(Math.toRadians(360 * M / 60))",
"Math.cos",
"Math",
"Math.toRadians(360 * M / 60)",
"Math.toRadians",
"Math",
"360 * M / 60",
"360 * M",
"360",
"M",
"60",
"double x = (Hx - Mx);",
"x",
"(Hx - Mx)",
"Hx",
"Mx",
"double y = (Hy - My);",
"y",
"(Hy - My)",
"Hy",
"My",
"System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))",
"Math.sqrt",
"Math",
"Math.pow(x, 2) + Math.pow(y, 2)",
"Math.pow(x, 2)",
"Math.pow",
"Math",
"x",
"2",
"Math.pow(y, 2)",
"Math.pow",
"Math",
"y",
"2",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int A = sc.nextInt();\n int B = sc.nextInt();\n double H = sc.nextDouble();\n double M = sc.nextDouble();\n sc.close();\n\n double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));\n double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));\n\n double Mx = B * Math.sin(Math.toRadians(360 * M / 60));\n double My = B * Math.cos(Math.toRadians(360 * M / 60));\n\n double x = (Hx - Mx);\n double y = (Hy - My);\n\n System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
double H = sc.nextDouble();
double M = sc.nextDouble();
sc.close();
double Hx = A * Math.sin(Math.toRadians(360 * (H + M / 60) / 12));
double Hy = A * Math.cos(Math.toRadians(360 * (H + M / 60) / 12));
double Mx = B * Math.sin(Math.toRadians(360 * M / 60));
double My = B * Math.cos(Math.toRadians(360 * M / 60));
double x = (Hx - Mx);
double y = (Hy - My);
System.out.println(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
2,
2,
13,
17,
2,
17,
17,
17,
41,
13,
2,
13,
17,
41,
13,
8,
2,
13,
13,
2,
17,
2,
13,
13,
2,
17,
2,
13,
13,
41,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
8,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
54,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
77,
81
],
[
70,
82
],
[
84,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
100,
101
],
[
101,
102
],
[
100,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] |
[
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"double a = sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b = sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double h = sc.nextDouble();",
"h",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double m = sc.nextDouble();",
"m",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double hour = h / 12 + m / 60 * (360 / 12) / 360;",
"hour",
"h / 12 + m / 60 * (360 / 12) / 360",
"h / 12",
"h",
"12",
"m / 60 * (360 / 12) / 360",
"m / 60 * (360 / 12)",
"m / 60",
"m",
"60",
"(360 / 12)",
"360",
"12",
"360",
"double minutes = m / 60;",
"minutes",
"m / 60",
"m",
"60",
"double angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);",
"angle",
"hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes)",
"hour < minutes",
"hour",
"minutes",
"360 * (minutes - hour)",
"360",
"(minutes - hour)",
"minutes",
"hour",
"360 * (hour - minutes)",
"360",
"(hour - minutes)",
"hour",
"minutes",
"double ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));",
"ansSquare",
"Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle))",
"Math.pow(a, 2) + Math.pow(b, 2)",
"Math.pow(a, 2)",
"Math.pow",
"Math",
"a",
"2",
"Math.pow(b, 2)",
"Math.pow",
"Math",
"b",
"2",
"2 * a * b * Math.cos(Math.toRadians(angle))",
"b",
"2 * a * b * Math.cos(Math.toRadians(angle))",
"2",
"a",
"b",
"Math.cos(Math.toRadians(angle))",
"Math.cos",
"Math",
"Math.toRadians(angle)",
"Math.toRadians",
"Math",
"angle",
"System.out.println(Math.sqrt(ansSquare))",
"System.out.println",
"System.out",
"System",
"System.out",
"Math.sqrt(ansSquare)",
"Math.sqrt",
"Math",
"ansSquare",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble a = sc.nextDouble();\n\t\tdouble b = sc.nextDouble();\n\t\tdouble h = sc.nextDouble();\n\t\tdouble m = sc.nextDouble();\n\t\t\n\t\tdouble hour = h / 12 + m / 60 * (360 / 12) / 360;\n\t\tdouble minutes = m / 60;\n\t\t\n\t\tdouble angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);\n\t\tdouble ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));\n\t\t\n\t\tSystem.out.println(Math.sqrt(ansSquare));\n\t\tsc.close();\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double a = sc.nextDouble();
double b = sc.nextDouble();
double h = sc.nextDouble();
double m = sc.nextDouble();
double hour = h / 12 + m / 60 * (360 / 12) / 360;
double minutes = m / 60;
double angle = hour < minutes ? 360 * (minutes - hour) : 360 * (hour - minutes);
double ansSquare = Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * Math.cos(Math.toRadians(angle));
System.out.println(Math.sqrt(ansSquare));
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
2,
13,
17,
2,
13,
17,
41,
13,
2,
13,
17,
41,
13,
4,
18,
13,
2,
13,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
4,
18,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
0,
13,
2,
17,
13,
0,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
30,
0,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
2,
17,
13,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
18,
13,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
4,
18,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
4,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
302,
11
],
[
302,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
14,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
14,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
14,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
14,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
14,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
66,
68
],
[
14,
69
],
[
69,
70
],
[
69,
71
],
[
14,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
72,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
110,
118
],
[
120,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
124,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
95,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
147,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
147,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
14,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
158,
163
],
[
12,
164
],
[
164,
165
],
[
302,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
168,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
175,
177
],
[
168,
178
],
[
178,
179
],
[
168,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
180,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
186,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
194,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
194,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
168,
208
],
[
208,
209
],
[
166,
210
],
[
210,
211
],
[
166,
212
],
[
212,
213
],
[
302,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
216,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
216,
226
],
[
226,
227
],
[
216,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
228,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
234,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
244,
247
],
[
243,
248
],
[
242,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
242,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
216,
257
],
[
257,
258
],
[
214,
259
],
[
259,
260
],
[
214,
261
],
[
261,
262
],
[
302,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
268,
270
],
[
267,
271
],
[
267,
272
],
[
272,
273
],
[
272,
274
],
[
272,
275
],
[
275,
276
],
[
275,
277
],
[
263,
278
],
[
278,
279
],
[
263,
280
],
[
280,
281
],
[
302,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
286,
291
],
[
291,
292
],
[
291,
293
],
[
291,
294
],
[
294,
295
],
[
294,
296
],
[
282,
297
],
[
297,
298
],
[
282,
299
],
[
299,
300
],
[
0,
301
],
[
301,
302
],
[
301,
303
]
] |
[
"import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\n\n\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\n\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}",
"main",
"{\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int A = sc.nextInt();",
"A",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int B = sc.nextInt();",
"B",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int H = sc.nextInt();",
"H",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int M = sc.nextInt();",
"M",
"sc.nextInt()",
"sc.nextInt",
"sc",
"double sec = (H*3600+H*60);",
"sec",
"(H*3600+H*60)",
"H*3600",
"H",
"3600",
"H*60",
"H",
"60",
"double jikanKakudo = H*30+M*0.5;",
"jikanKakudo",
"H*30+M*0.5",
"H*30",
"H",
"30",
"M*0.5",
"M",
"0.5",
"double hunKakudo = M*6;",
"hunKakudo",
"M*6",
"M",
"6",
"double kakudo = Math.abs(hunKakudo- jikanKakudo);",
"kakudo",
"Math.abs(hunKakudo- jikanKakudo)",
"Math.abs",
"Math",
"hunKakudo- jikanKakudo",
"hunKakudo",
"jikanKakudo",
"double ans = 0;",
"ans",
"0",
"if(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}",
"kakudo == 0",
"kakudo",
"0",
"{\n\t\t\tans = Math.abs(A-B);\n\t\t}",
"ans = Math.abs(A-B)",
"ans",
"Math.abs(A-B)",
"Math.abs",
"Math",
"A-B",
"A",
"B",
"if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}",
"kakudo == 180",
"kakudo",
"180",
"{\n\t\t\tans = A+B;\n\t\t}",
"ans = A+B",
"ans",
"A+B",
"A",
"B",
"if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}",
"kakudo>180",
"kakudo",
"180",
"{\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}",
"kakudo = 360 - kakudo",
"kakudo",
"360 - kakudo",
"360",
"kakudo",
"ans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)))",
"ans",
"Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)))",
"Math.sqrt",
"Math",
"A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo))",
"A*A + B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*A*B*Math.cos(Math.toRadians(kakudo))",
"B",
"2*A*B*Math.cos(Math.toRadians(kakudo))",
"2",
"A",
"B",
"Math.cos(Math.toRadians(kakudo))",
"Math.cos",
"Math",
"Math.toRadians(kakudo)",
"Math.toRadians",
"Math",
"kakudo",
"{\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}",
"ans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)))",
"ans",
"Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)))",
"Math.sqrt",
"Math",
"A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo))",
"A*A + B*B",
"A*A",
"A",
"A",
"B*B",
"B",
"B",
"2*A*B*Math.cos(Math.toRadians(kakudo))",
"B",
"2*A*B*Math.cos(Math.toRadians(kakudo))",
"2",
"A",
"B",
"Math.cos(Math.toRadians(kakudo))",
"Math.cos",
"Math",
"Math.toRadians(kakudo)",
"Math.toRadians",
"Math",
"kakudo",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedArray.length;",
"upperBorder",
"orderedArray.length",
"orderedArray",
"orderedArray.length",
"int mid;",
"mid",
"while(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder >1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder)/2",
"mid",
"(upperBorder + lowerBorder)/2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedArray[mid]<=num",
"orderedArray[mid]",
"orderedArray",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"long[] orderedArray",
"orderedArray",
"//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedList.size();",
"upperBorder",
"orderedList.size()",
"orderedList.size",
"orderedList",
"int mid;",
"mid",
"while(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder >1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder)/2",
"mid",
"(upperBorder + lowerBorder)/2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedList.get(mid)<=num",
"orderedList.get(mid)",
"orderedList.get",
"orderedList",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"ArrayList<Long> orderedList",
"orderedList",
"//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}",
"gcd",
"{\n return b == 0 ? a: gcd(b, a % b);\n\t}",
"return b == 0 ? a: gcd(b, a % b);",
"b == 0 ? a: gcd(b, a % b)",
"b == 0",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static long gcd(long a, long b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}",
"gcd",
"{\n return b == 0 ? a: gcd(b, a % b);\n\t}",
"return b == 0 ? a: gcd(b, a % b);",
"b == 0 ? a: gcd(b, a % b)",
"b == 0",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\n\n\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n//\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n//\t\tString W\t = in.readLine();\n//\t\tint num = Integer.parseInt(W.split(\" \")[0]);\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint A = sc.nextInt();\n\t\tint B = sc.nextInt();\n\t\tint H = sc.nextInt();\n\t\tint M = sc.nextInt();\n\n\n\t\tdouble sec = (H*3600+H*60);\n\n\t\tdouble jikanKakudo = H*30+M*0.5;\n\t\tdouble hunKakudo = M*6;\n\t\tdouble kakudo = Math.abs(hunKakudo- jikanKakudo);\n\t\tdouble ans = 0;\n\n\t\tif(kakudo == 0){\n\t\t\tans = Math.abs(A-B);\n\t\t}else if(kakudo == 180){\n\t\t\tans = A+B;\n\t\t}else if(kakudo>180) {\n\t\t\tkakudo = 360 - kakudo;\n\t\t\tans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}else {\n\n\t\t\tans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));\n\t\t}\n\n\t\t\tSystem.out.println(ans);\n\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n return b == 0 ? a: gcd(b, a % b);\n\t}\n\n\n\n}",
"Main"
] |
import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
// BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
// String W = in.readLine();
// int num = Integer.parseInt(W.split(" ")[0]);
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
int H = sc.nextInt();
int M = sc.nextInt();
double sec = (H*3600+H*60);
double jikanKakudo = H*30+M*0.5;
double hunKakudo = M*6;
double kakudo = Math.abs(hunKakudo- jikanKakudo);
double ans = 0;
if(kakudo == 0){
ans = Math.abs(A-B);
}else if(kakudo == 180){
ans = A+B;
}else if(kakudo>180) {
kakudo = 360 - kakudo;
ans = Math.sqrt(A*A + B*B - 2*A*B*Math.cos(Math.toRadians(kakudo)));
}else {
ans = Math.sqrt(A*A + B*B -2*A*B*Math.cos(Math.toRadians(kakudo)));
}
System.out.println(ans);
}
// //二分探索
//k <= num となる最小の配列要素kのインデックスを返す
static private int binarySearch(long num, long[] orderedArray){
int lowerBorder = -1;
int upperBorder = orderedArray.length;
int mid;
while(upperBorder - lowerBorder >1) {
mid = (upperBorder + lowerBorder)/2;
if(orderedArray[mid]<=num) {
lowerBorder = mid;
}else {
upperBorder = mid;
}
}
return lowerBorder;
}
//二分探索
//k <= num となる最小のList要素kのインデックスを返す
static private int binarySearch(long num, ArrayList<Long> orderedList){
int lowerBorder = -1;
int upperBorder = orderedList.size();
int mid;
while(upperBorder - lowerBorder >1) {
mid = (upperBorder + lowerBorder)/2;
if(orderedList.get(mid)<=num) {
lowerBorder = mid;
}else {
upperBorder = mid;
}
}
return lowerBorder;
}
//aとbの最小公倍数を求める
public static int gcd(int a, int b) {
return b == 0 ? a: gcd(b, a % b);
}
public static long gcd(long a, long b) {
return b == 0 ? a: gcd(b, a % b);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
2,
2,
2,
2,
13,
17,
2,
2,
13,
17,
17,
2,
13,
17,
17,
18,
13,
13,
0,
13,
8,
2,
13,
17,
40,
13,
13,
41,
13,
4,
18,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
17,
2,
2,
2,
17,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
100,
5
],
[
100,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
10,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
10,
34
],
[
34,
35
],
[
34,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
44,
44
],
[
44,
45
],
[
44,
46
],
[
44,
47
],
[
38,
48
],
[
48,
49
],
[
48,
50
],
[
37,
51
],
[
37,
52
],
[
52,
53
],
[
52,
54
],
[
10,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
57,
63
],
[
10,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
76,
80
],
[
69,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
10,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}",
"main",
"{\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}",
"try(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}",
"{\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}",
"Scanner scanner = new Scanner(System.in)",
"Scanner scanner = new Scanner(System.in)",
"new Scanner(System.in)",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int H = scanner.nextInt();",
"H",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int M = scanner.nextInt();",
"M",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"double sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;",
"sita",
"((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI",
"((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI",
"((double)H / 12 + (double)M / 12 / 60 - (double)M / 60)",
"(double)H / 12 + (double)M / 12 / 60",
"(double)H / 12",
"(double)H",
"12",
"(double)M / 12 / 60",
"(double)M / 12 / 60",
"(double)M",
"12",
"60",
"(double)M / 60",
"(double)M",
"60",
"2",
"Math.PI",
"Math",
"Math.PI",
"sita = sita < 0 ? -(double)sita : sita",
"sita",
"sita < 0 ? -(double)sita : sita",
"sita < 0",
"sita",
"0",
"-(double)sita",
"(double)sita",
"sita",
"double answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));",
"answer",
"Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))))",
"Math.sqrt",
"Math",
"(double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita)))",
"Math.pow(A, 2) + Math.pow(B, 2)",
"Math.pow(A, 2)",
"Math.pow",
"Math",
"A",
"2",
"Math.pow(B, 2)",
"Math.pow",
"Math",
"B",
"2",
"(double)((double)(2 * A * B) * Math.cos(sita))",
"(double)(2 * A * B)",
"2 * A * B",
"2",
"A",
"B",
"Math.cos(sita)",
"Math.cos",
"Math",
"sita",
"System.out.print(answer)",
"System.out.print",
"System.out",
"System",
"System.out",
"answer",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry(Scanner scanner = new Scanner(System.in)) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tint H = scanner.nextInt();\n\t\t\tint M = scanner.nextInt();\n\n\t\t\tdouble sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;\n\t\t\tsita = sita < 0 ? -(double)sita : sita;\n\t\t\tdouble answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));\n\t\t\tSystem.out.print(answer);\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try(Scanner scanner = new Scanner(System.in)) {
int A = scanner.nextInt();
int B = scanner.nextInt();
int H = scanner.nextInt();
int M = scanner.nextInt();
double sita = ((double)H / 12 + (double)M / 12 / 60 - (double)M / 60) * 2 * Math.PI;
sita = sita < 0 ? -(double)sita : sita;
double answer = Math.sqrt((double)(Math.pow(A, 2) + Math.pow(B, 2) - (double)((double)(2 * A * B) * Math.cos(sita))));
System.out.print(answer);
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
2,
2,
4,
18,
13,
17,
4,
18,
13,
4,
18,
4,
18,
13,
17,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
62,
5
],
[
62,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
10,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
27,
31
],
[
26,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
35,
44
],
[
24,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
24,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
6,
59
],
[
59,
60
],
[
0,
61
],
[
61,
62
],
[
61,
63
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}",
"try(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}",
"{\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"if ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)",
"s.length() + 1 == t.length()",
"s.length() + 1",
"s.length()",
"s.length",
"s",
"1",
"t.length()",
"t.length",
"t",
"t.substring(0, s.length()).contentEquals(s)",
"t.substring(0, s.length()).contentEquals",
"t.substring(0, s.length())",
"t.substring",
"t",
"0",
"s.length()",
"s.length",
"s",
"s",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\ttry(Scanner sc = new Scanner(System.in)) {\n\t\t\t\n\t\t\tString s = sc.next();\n\t\t\tString t = sc.next();\n\t\t\t\n\t\t\tif ( s.length() + 1 == t.length() && \n\t\t\t\t\tt.substring(0, s.length()).contentEquals(s)) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args){
try(Scanner sc = new Scanner(System.in)) {
String s = sc.next();
String t = sc.next();
if ( s.length() + 1 == t.length() &&
t.substring(0, s.length()).contentEquals(s)) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
2,
2,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
54,
5
],
[
54,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
25,
29
],
[
24,
30
],
[
30,
31
],
[
31,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
22,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
22,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
6,
51
],
[
51,
52
],
[
0,
53
],
[
53,
54
],
[
53,
55
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"final Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"final String s = scanner.nextLine();",
"s",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"final String t = scanner.nextLine();",
"t",
"scanner.nextLine()",
"scanner.nextLine",
"scanner",
"if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"s.length() + 1 == t.length() && t.startsWith(s)",
"s.length() + 1 == t.length()",
"s.length() + 1",
"s.length()",
"s.length",
"s",
"1",
"t.length()",
"t.length",
"t",
"t.startsWith(s)",
"t.startsWith",
"t",
"s",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n final Scanner scanner = new Scanner(System.in);\n final String s = scanner.nextLine();\n final String t = scanner.nextLine();\n\n if (s.length() + 1 == t.length() && t.startsWith(s)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
final Scanner scanner = new Scanner(System.in);
final String s = scanner.nextLine();
final String t = scanner.nextLine();
if (s.length() + 1 == t.length() && t.startsWith(s)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
55,
5
],
[
55,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] |
[
"import java.util.Scanner;\n\n\n\npublic class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str = sc.nextLine();",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str2 = sc.nextLine();",
"str2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str3 = str2.substring(0, str2.length() - 1);",
"str3",
"str2.substring(0, str2.length() - 1)",
"str2.substring",
"str2",
"0",
"str2.length() - 1",
"str2.length()",
"str2.length",
"str2",
"1",
"if(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"str.equals(str3)",
"str.equals",
"str",
"str3",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString str2 = sc.nextLine();\n\t\tString str3 = str2.substring(0, str2.length() - 1);\n\t\tif(str.equals(str3)) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
String str2 = sc.nextLine();
String str3 = str2.substring(0, str2.length() - 1);
if(str.equals(str3)) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
41,
13,
17,
14,
4,
18,
13,
13,
30,
0,
13,
17,
14,
13,
30,
14,
2,
2,
4,
18,
13,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
8,
33
],
[
33,
34
],
[
33,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
36,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
49,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
45,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"String t = in.next();",
"t",
"in.next()",
"in.next",
"in",
"String t2 = t.substring(0,t.length()-1);",
"t2",
"t.substring(0,t.length()-1)",
"t.substring",
"t",
"0",
"t.length()-1",
"t.length()",
"t.length",
"t",
"1",
"boolean ok = false;",
"ok",
"false",
"if(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}",
"s.equals(t2)",
"s.equals",
"s",
"t2",
"{\n\t\t\tok = true;\n\t\t}",
"ok = true",
"ok",
"true",
"if(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"ok",
"{\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}",
"if(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}",
"t.length()-s.length() == 1",
"t.length()-s.length()",
"t.length()",
"t.length",
"t",
"s.length()",
"s.length",
"s",
"1",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner in = new Scanner(System.in);\n\t\tString s = in.next();\n\t\tString t = in.next();\n\t\tString t2 = t.substring(0,t.length()-1);\n\t\tboolean ok = false;\n\n\t\tif(s.equals(t2)) {\n\t\t\tok = true;\n\t\t}\n\t\tif(ok){\n\t\t\tif(t.length()-s.length() == 1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner in = new Scanner(System.in);
String s = in.next();
String t = in.next();
String t2 = t.substring(0,t.length()-1);
boolean ok = false;
if(s.equals(t2)) {
ok = true;
}
if(ok){
if(t.length()-s.length() == 1) {
System.out.println("Yes");
}
}else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
4,
18,
13,
17,
0,
13,
2,
13,
4,
18,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
65,
11
],
[
65,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
14,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
14,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
43,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
43,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
12,
62
],
[
62,
63
],
[
0,
64
],
[
64,
65
],
[
64,
66
]
] |
[
"\nimport java.util.*;\nimport java.io.*;\n\nimport static java.lang.Character.isUpperCase;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n\n\n\n\n\n\n\n }\n\n\n",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.Character.isUpperCase;",
"import static java.lang.Character.isUpperCase;",
"import static java.lang.Character.isUpperCase;",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n\n\n\n\n\n\n\n }",
"Main",
"public static void main(String[] args) {\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String str = in.next();",
"str",
"in.next()",
"in.next",
"in",
"String sc = in.next();",
"sc",
"in.next()",
"in.next",
"in",
"int a = sc.length()-1;",
"a",
"sc.length()-1",
"sc.length()",
"sc.length",
"sc",
"1",
"str = str + sc.charAt(a)",
"str",
"str + sc.charAt(a)",
"str",
"sc.charAt(a)",
"sc.charAt",
"sc",
"a",
"if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }",
"str.equals(sc)",
"str.equals",
"str",
"sc",
"{\n System.out.println(\"Yes\");\n\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n\n\n\n\n\n\n\n }",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner in = new Scanner(System.in);\n\n String str = in.next();\n String sc = in.next();\n\n\n int a = sc.length()-1;\n\n\n str = str + sc.charAt(a);\n\n\n if(str.equals(sc))\n {\n System.out.println(\"Yes\");\n\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n\n\n\n\n\n\n\n }",
"Main"
] |
import java.util.*;
import java.io.*;
import static java.lang.Character.isUpperCase;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String str = in.next();
String sc = in.next();
int a = sc.length()-1;
str = str + sc.charAt(a);
if(str.equals(sc))
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
2,
4,
18,
13,
17,
14,
4,
18,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
27,
31
],
[
8,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
]
] |
[
"import java.util.*;\nclass Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n String x=sc.next();\n String y=sc.next();\n x+=y.charAt(y.length()-1);\n if(x.equals(y))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n String x=sc.next();\n String y=sc.next();\n x+=y.charAt(y.length()-1);\n if(x.equals(y))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n String x=sc.next();\n String y=sc.next();\n x+=y.charAt(y.length()-1);\n if(x.equals(y))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n String x=sc.next();\n String y=sc.next();\n x+=y.charAt(y.length()-1);\n if(x.equals(y))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String x=sc.next();",
"x",
"sc.next()",
"sc.next",
"sc",
"String y=sc.next();",
"y",
"sc.next()",
"sc.next",
"sc",
"x+=y.charAt(y.length()-1)",
"x",
"y.charAt(y.length()-1)",
"y.charAt",
"y",
"y.length()-1",
"y.length()",
"y.length",
"y",
"1",
"if(x.equals(y))\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"x.equals(y)",
"x.equals",
"x",
"y",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args"
] |
import java.util.*;
class Main
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String x=sc.next();
String y=sc.next();
x+=y.charAt(y.length()-1);
if(x.equals(y))
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
8,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
34,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
6,
53
],
[
53,
54
]
] |
[
"import java.util.Scanner;\n \nclass Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n String val1 = scanner.next();\n String val2 = scanner.next();\n scanner.close();\n String check = val2.substring(0, val1.length());\n if(check.equals(val1)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n \n public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n String val1 = scanner.next();\n String val2 = scanner.next();\n scanner.close();\n String check = val2.substring(0, val1.length());\n if(check.equals(val1)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n \n}",
"Main",
"public static void main(String[] args){\n \n Scanner scanner = new Scanner(System.in);\n String val1 = scanner.next();\n String val2 = scanner.next();\n scanner.close();\n String check = val2.substring(0, val1.length());\n if(check.equals(val1)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n \n Scanner scanner = new Scanner(System.in);\n String val1 = scanner.next();\n String val2 = scanner.next();\n scanner.close();\n String check = val2.substring(0, val1.length());\n if(check.equals(val1)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String val1 = scanner.next();",
"val1",
"scanner.next()",
"scanner.next",
"scanner",
"String val2 = scanner.next();",
"val2",
"scanner.next()",
"scanner.next",
"scanner",
"scanner.close()",
"scanner.close",
"scanner",
"String check = val2.substring(0, val1.length());",
"check",
"val2.substring(0, val1.length())",
"val2.substring",
"val2",
"0",
"val1.length()",
"val1.length",
"val1",
"if(check.equals(val1)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"check.equals(val1)",
"check.equals",
"check",
"val1",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
] |
import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner scanner = new Scanner(System.in);
String val1 = scanner.next();
String val2 = scanner.next();
scanner.close();
String check = val2.substring(0, val1.length());
if(check.equals(val1)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
20,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
31,
35
],
[
8,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
36,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
36,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
6,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
] |
[
"import java.util.Scanner;\n\npublic class Main{\n public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner in=new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"String s1=in.nextLine();",
"s1",
"in.nextLine()",
"in.nextLine",
"in",
"String s2=in.nextLine();",
"s2",
"in.nextLine()",
"in.nextLine",
"in",
"StringBuilder sb=new StringBuilder(s1);",
"sb",
"new StringBuilder(s1)",
"sb.append(s2.charAt(s2.length()-1))",
"sb.append",
"sb",
"s2.charAt(s2.length()-1)",
"s2.charAt",
"s2",
"s2.length()-1",
"s2.length()",
"s2.length",
"s2",
"1",
"if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"s2.contains(sb)",
"s2.contains",
"s2",
"sb",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[] args) {\n Scanner in=new Scanner(System.in);\n String s1=in.nextLine();\n String s2=in.nextLine();\n StringBuilder sb=new StringBuilder(s1);\n sb.append(s2.charAt(s2.length()-1));\n if(s2.contains(sb)){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
String s1=in.nextLine();
String s2=in.nextLine();
StringBuilder sb=new StringBuilder(s1);
sb.append(s2.charAt(s2.length()-1));
if(s2.contains(sb)){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
41,
13,
4,
13,
41,
13,
4,
13,
14,
4,
18,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
89,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
10,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
22,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
22,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
8,
49
],
[
49,
50
],
[
89,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
89,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
89,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
76,
77
],
[
89,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main",
"static Scanner scanner;",
"scanner",
"public static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}",
"main",
"{\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}",
"scanner = new Scanner(System.in)",
"scanner",
"new Scanner(System.in)",
"String s=gs();",
"s",
"gs()",
"gs",
"String t=gs();",
"t",
"gs()",
"gs",
"if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }",
"s.equals(t.substring(0, t.length()-1))",
"s.equals",
"s",
"t.substring(0, t.length()-1)",
"t.substring",
"t",
"0",
"t.length()-1",
"t.length()",
"t.length",
"t",
"1",
"{\n\t \tSystem.out.print(\"Yes\");\n\t }",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t \tSystem.out.print(\"No\");\n\t }",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}",
"gs",
"{\n\t\treturn scanner.next();\n\t}",
"return scanner.next();",
"scanner.next()",
"scanner.next",
"scanner",
"// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"gi",
"{\n\t\treturn Integer.parseInt(scanner.next());\n\t}",
"return Integer.parseInt(scanner.next());",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"gl",
"{\n\t\treturn Long.parseLong(scanner.next());\n\t}",
"return Long.parseLong(scanner.next());",
"Long.parseLong(scanner.next())",
"Long.parseLong",
"Long",
"scanner.next()",
"scanner.next",
"scanner",
"// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"gd",
"{\n\t\treturn Double.parseDouble(scanner.next());\n\t}",
"return Double.parseDouble(scanner.next());",
"Double.parseDouble(scanner.next())",
"Double.parseDouble",
"Double",
"scanner.next()",
"scanner.next",
"scanner",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"public class Main {\n\n\tstatic Scanner scanner;\n\n\tpublic static void main(String[] args) {\n\t scanner = new Scanner(System.in);\n\n\t //int k=gi();\n String s=gs();\n String t=gs();\n \n\n\t //System.out.print(nr*2*Math.PI);\n\t if (s.equals(t.substring(0, t.length()-1))) {\n\t \tSystem.out.print(\"Yes\");\n\t }else {\n\t \tSystem.out.print(\"No\");\n\t }\n\n\n\t}\n\n\t// 文字列として入力を取得\n\tpublic static String gs() {\n\t\treturn scanner.next();\n\t}\n\n\t// intとして入力を取得\n\tpublic static int gi() {\n\t\treturn Integer.parseInt(scanner.next());\n\t}\n\n\t// longとして入力を取得\n\tpublic static long gl() {\n\t\treturn Long.parseLong(scanner.next());\n\t}\n\n\t// doubleとして入力を取得\n\tpublic static double gd() {\n\t\treturn Double.parseDouble(scanner.next());\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
static Scanner scanner;
public static void main(String[] args) {
scanner = new Scanner(System.in);
//int k=gi();
String s=gs();
String t=gs();
//System.out.print(nr*2*Math.PI);
if (s.equals(t.substring(0, t.length()-1))) {
System.out.print("Yes");
}else {
System.out.print("No");
}
}
// 文字列として入力を取得
public static String gs() {
return scanner.next();
}
// intとして入力を取得
public static int gi() {
return Integer.parseInt(scanner.next());
}
// longとして入力を取得
public static long gl() {
return Long.parseLong(scanner.next());
}
// doubleとして入力を取得
public static double gd() {
return Double.parseDouble(scanner.next());
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
55,
5
],
[
55,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
33,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
33,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
6,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] |
[
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String strS = sc.next();",
"strS",
"sc.next()",
"sc.next",
"sc",
"String strT = sc.next();",
"strT",
"sc.next()",
"sc.next",
"sc",
"strT = strT.substring(0, strT.length() - 1)",
"strT",
"strT.substring(0, strT.length() - 1)",
"strT.substring",
"strT",
"0",
"strT.length() - 1",
"strT.length()",
"strT.length",
"strT",
"1",
"if (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"strS.equals(strT)",
"strS.equals",
"strS",
"strT",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n \n \tString strS = sc.next();\n \t\n \tString strT = sc.next();\n \n \tstrT = strT.substring(0, strT.length() - 1);\n \t\n \tif (strS.equals(strT)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \t\n\t}\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
String strS = sc.next();
String strT = sc.next();
strT = strT.substring(0, strT.length() - 1);
if (strS.equals(strT)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
40,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
0,
13,
17,
3,
14,
2,
13,
2,
4,
18,
13,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
40,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
63,
67
],
[
56,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
56,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
] |
[
"import java.util.Scanner;\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"boolean check = true;",
"check",
"true",
"for(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<s.length()",
"i",
"s.length()",
"s.length",
"s",
"i++",
"i++",
"i",
"{\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}",
"!(s.charAt(i)==t.charAt(i))",
"(s.charAt(i)==t.charAt(i))",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"t.charAt(i)",
"t.charAt",
"t",
"i",
"{\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}",
"check = false",
"check",
"false",
"break;",
"if(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"check && t.length()==s.length()+1",
"check",
"t.length()==s.length()+1",
"t.length()",
"t.length",
"t",
"s.length()+1",
"s.length()",
"s.length",
"s",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tString t = sc.next();\n\t\tboolean check = true;\n\t\tfor(int i=0;i<s.length();i++) {\n\t\t\tif(!(s.charAt(i)==t.charAt(i))) {\n\t\t\t\tcheck = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(check && t.length()==s.length()+1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
boolean check = true;
for(int i=0;i<s.length();i++) {
if(!(s.charAt(i)==t.charAt(i))) {
check = false;
break;
}
}
if(check && t.length()==s.length()+1) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
4,
18,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
17,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
51,
11
],
[
51,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
14,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
41,
45
],
[
33,
46
],
[
33,
47
],
[
12,
48
],
[
48,
49
],
[
0,
50
],
[
50,
51
],
[
50,
52
]
] |
[
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line1 = br.readLine();",
"line1",
"br.readLine()",
"br.readLine",
"br",
"String line2 = br.readLine();",
"line2",
"br.readLine()",
"br.readLine",
"br",
"System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\"",
"line1.equals(line2.substring(0, line2.length() - 1))",
"line1.equals",
"line1",
"line2.substring(0, line2.length() - 1)",
"line2.substring",
"line2",
"0",
"line2.length() - 1",
"line2.length()",
"line2.length",
"line2",
"1",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line1 = br.readLine();\n\t\tString line2 = br.readLine();\n\t\tSystem.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? \"Yes\" : \"No\");\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line1 = br.readLine();
String line2 = br.readLine();
System.out.println(line1.equals(line2.substring(0, line2.length() - 1)) ? "Yes" : "No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
17,
13,
4,
18,
13,
8,
13,
17,
17,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
74,
11
],
[
74,
12
],
[
12,
13
],
[
74,
14
],
[
14,
15
],
[
74,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
18,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
18,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
18,
35
],
[
35,
36
],
[
36,
37
],
[
18,
38
],
[
38,
39
],
[
38,
40
],
[
18,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
18,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
18,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
18,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
18,
68
],
[
68,
69
],
[
69,
70
],
[
16,
71
],
[
71,
72
],
[
0,
73
],
[
73,
74
],
[
73,
75
]
] |
[
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\n\npublic class Main {\n\n static String s, t;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"public class Main {\n\n static String s, t;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }\n}",
"Main",
"static String s",
"s",
"t;",
"t",
"public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }",
"main",
"{\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"s = br.readLine()",
"s",
"br.readLine()",
"br.readLine",
"br",
"t = br.readLine()",
"t",
"br.readLine()",
"br.readLine",
"br",
"br.close()",
"br.close",
"br",
"boolean flag = true;",
"flag",
"true",
"int n = s.length();",
"n",
"s.length()",
"s.length",
"s",
"int m = t.length();",
"m",
"t.length()",
"t.length",
"t",
"flag = s.equals(t.substring(0, n))",
"flag",
"s.equals(t.substring(0, n))",
"s.equals",
"s",
"t.substring(0, n)",
"t.substring",
"t",
"0",
"n",
"out.println(flag ? \"Yes\" : \"No\")",
"out.println",
"out",
"flag ? \"Yes\" : \"No\"",
"flag",
"\"Yes\"",
"\"No\"",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"public class Main {\n\n static String s, t;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }\n}",
"public class Main {\n\n static String s, t;\n\n public static void main(String[] args) throws Exception {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(System.out);\n\n //String[] in = br.readLine().split(\" \");\n s = br.readLine();\n t = br.readLine();\n\n /*\n =====templates=====\n ===inputs===\n static int n;\n in = br.readLine().split(\" \");\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n int n = Integer.parseInt(in[0]);\n long n = Long.parseLong(in[0]);\n int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();\n\n ===outputs===\n PrintWriter out = new PrintWriter(System.out);\n out.println(ans);\n out.flush();\n */\n\n br.close();\n\n boolean flag = true;\n int n = s.length();\n int m = t.length();\n\n flag = s.equals(t.substring(0, n));\n\n out.println(flag ? \"Yes\" : \"No\");\n\n out.flush();\n\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
public class Main {
static String s, t;
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(System.out);
//String[] in = br.readLine().split(" ");
s = br.readLine();
t = br.readLine();
/*
=====templates=====
===inputs===
static int n;
in = br.readLine().split(" ");
int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();
int n = Integer.parseInt(in[0]);
long n = Long.parseLong(in[0]);
int[] a = Stream.of(in).mapToInt(Integer::parseInt).toArray();
===outputs===
PrintWriter out = new PrintWriter(System.out);
out.println(ans);
out.flush();
*/
br.close();
boolean flag = true;
int n = s.length();
int m = t.length();
flag = s.equals(t.substring(0, n));
out.println(flag ? "Yes" : "No");
out.flush();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
4,
18,
13,
14,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
56,
5
],
[
56,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
8,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
31,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
8,
50
],
[
50,
51
],
[
51,
52
],
[
6,
53
],
[
53,
54
],
[
0,
55
],
[
55,
56
],
[
55,
57
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"String Tmatch=T.substring(0, S.length());",
"Tmatch",
"T.substring(0, S.length())",
"T.substring",
"T",
"0",
"S.length()",
"S.length",
"S",
"if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"Tmatch.equals(S)",
"Tmatch.equals",
"Tmatch",
"S",
"{//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n String S = sc.next();\n String T = sc.next();\n\n //String lastChar = Character.toString(T.charAt(S.length()));\n\n String Tmatch=T.substring(0, S.length());\n\n //String str = T.substring(S.length());\n //System.out.println(str);\n if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
//String lastChar = Character.toString(T.charAt(S.length()));
String Tmatch=T.substring(0, S.length());
//String str = T.substring(S.length());
//System.out.println(str);
if (Tmatch.equals(S) ){//&& str.equals(lastChar)) {
System.out.println("Yes");
} else {
System.out.println("No");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
4,
18,
13,
17,
13,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
53,
5
],
[
53,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
30,
34
],
[
28,
35
],
[
27,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
27,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
6,
50
],
[
50,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
]
] |
[
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String S = sc.next();",
"S",
"sc.next()",
"sc.next",
"sc",
"String T = sc.next();",
"T",
"sc.next()",
"sc.next",
"sc",
"int lgt = S.length();",
"lgt",
"S.length()",
"S.length",
"S",
"if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"T.substring(0,lgt).equals(S)",
"T.substring(0,lgt).equals",
"T.substring(0,lgt)",
"T.substring",
"T",
"0",
"lgt",
"S",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n String S = sc.next();\n String T = sc.next();\n \n int lgt = S.length();\n if(T.substring(0,lgt).equals(S)){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
String S = sc.next();
String T = sc.next();
int lgt = S.length();
if(T.substring(0,lgt).equals(S)){
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
52,
5
],
[
52,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
22,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
22,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
6,
49
],
[
49,
50
],
[
0,
51
],
[
51,
52
],
[
51,
53
]
] |
[
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String s1 = scan.next();",
"s1",
"scan.next()",
"scan.next",
"scan",
"String s2 = scan.next();",
"s2",
"scan.next()",
"scan.next",
"scan",
"if(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"s1.equals(s2.substring(0,s2.length()-1))",
"s1.equals",
"s1",
"s2.substring(0,s2.length()-1)",
"s2.substring",
"s2",
"0",
"s2.length()-1",
"s2.length()",
"s2.length",
"s2",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tString s1 = scan.next();\n\t\tString s2 = scan.next();\n\t\tif(s1.equals(s2.substring(0,s2.length()-1))) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s1 = scan.next();
String s2 = scan.next();
if(s1.equals(s2.substring(0,s2.length()-1))) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
17,
41,
13,
20,
41,
13,
20,
4,
18,
13,
2,
18,
13,
13,
17,
14,
4,
18,
4,
18,
13,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
8,
37
],
[
37,
38
],
[
37,
39
],
[
8,
40
],
[
40,
41
],
[
40,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
8,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
52,
57
],
[
57,
58
],
[
58,
59
],
[
51,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
51,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
] |
[
"import java.util.*;\n\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String s = sc.next();",
"s",
"sc.next()",
"sc.next",
"sc",
"String t = sc.next();",
"t",
"sc.next()",
"sc.next",
"sc",
"sc.close()",
"sc.close",
"sc",
"String[] arr1 = s.split(\"\");",
"arr1",
"s.split(\"\")",
"s.split",
"s",
"\"\"",
"String[] arr2 = t.split(\"\");",
"arr2",
"t.split(\"\")",
"t.split",
"t",
"\"\"",
"List list1 = new LinkedList(Arrays.asList(s.split(\"\")));",
"list1",
"new LinkedList(Arrays.asList(s.split(\"\")))",
"List list2 = new LinkedList(Arrays.asList(t.split(\"\")));",
"list2",
"new LinkedList(Arrays.asList(t.split(\"\")))",
"list2.remove(arr2.length - 1)",
"list2.remove",
"list2",
"arr2.length - 1",
"arr2.length",
"arr2",
"arr2.length",
"1",
"if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"list1.toString().contentEquals(list2.toString())",
"list1.toString().contentEquals",
"list1.toString()",
"list1.toString",
"list1",
"list2.toString()",
"list2.toString",
"list2",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String s = sc.next();\n String t = sc.next();\n sc.close();\n String[] arr1 = s.split(\"\");\n String[] arr2 = t.split(\"\");\n// List<String> list1 = Arrays.asList(s.split(\"\"));\n List list1 = new LinkedList(Arrays.asList(s.split(\"\")));\n// List<String> list2 = Arrays.asList(t.split(\"\"));\n List list2 = new LinkedList(Arrays.asList(t.split(\"\")));\n// int num = Integer.parseInt(arr[arr.length - 1]);\n list2.remove(arr2.length - 1);\n// System.out.println(list1);\n// System.out.println(list2);\n if(list1.toString().contentEquals(list2.toString())){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n// switch(num){\n// case 3:\n// System.out.println(\"bon\");\n// break;\n// case 0:\n// case 1:\n// case 6:\n// case 8:\n// System.out.println(\"pon\");\n// break;\n// default:\n// System.out.println(\"hon\");\n// break;\n// }\n// String[] array = str.split(\" \");\n// int sum = 0;\n// for(int i=0; i<array.length; i++) {\n// int num = Integer.parseInt(array[i]);\n// sum += num;\n// }\n// System.out.println(15-sum);\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String s = sc.next();
String t = sc.next();
sc.close();
String[] arr1 = s.split("");
String[] arr2 = t.split("");
// List<String> list1 = Arrays.asList(s.split(""));
List list1 = new LinkedList(Arrays.asList(s.split("")));
// List<String> list2 = Arrays.asList(t.split(""));
List list2 = new LinkedList(Arrays.asList(t.split("")));
// int num = Integer.parseInt(arr[arr.length - 1]);
list2.remove(arr2.length - 1);
// System.out.println(list1);
// System.out.println(list2);
if(list1.toString().contentEquals(list2.toString())){
System.out.println("Yes");
}else{
System.out.println("No");
}
// switch(num){
// case 3:
// System.out.println("bon");
// break;
// case 0:
// case 1:
// case 6:
// case 8:
// System.out.println("pon");
// break;
// default:
// System.out.println("hon");
// break;
// }
// String[] array = str.split(" ");
// int sum = 0;
// for(int i=0; i<array.length; i++) {
// int num = Integer.parseInt(array[i]);
// sum += num;
// }
// System.out.println(15-sum);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
4,
18,
18,
13,
17,
2,
18,
13,
17,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
66,
5
],
[
66,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
16,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
16,
29
],
[
30,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
36,
37
],
[
8,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
38,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
6,
63
],
[
63,
64
],
[
0,
65
],
[
65,
66
],
[
65,
67
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }",
"main",
"{\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String[] str = new String[2];",
"str",
"new String[2]",
"2",
"for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < str.length",
"i",
"str.length",
"str",
"str.length",
"i++",
"i++",
"i",
"{\n\t\t str[i] = scan.nextLine();\n }",
"{\n\t\t str[i] = scan.nextLine();\n }",
"str[i] = scan.nextLine()",
"str[i]",
"str",
"i",
"scan.nextLine()",
"scan.nextLine",
"scan",
"if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"str[1].matches(str[0] + \"\\\\w{1}\")",
"str[1].matches",
"str[1]",
"str",
"1",
"str[0] + \"\\\\w{1}\"",
"str[0]",
"str",
"0",
"\"\\\\w{1}\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n\n Scanner scan = new Scanner(System.in);\n String[] str = new String[2];\n \n for(int i = 0; i < str.length; i++){\n\t\t str[i] = scan.nextLine();\n }\n \n if(str[1].matches(str[0] + \"\\\\w{1}\")){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner scan = new Scanner(System.in);
String[] str = new String[2];
for(int i = 0; i < str.length; i++){
str[i] = scan.nextLine();
}
if(str[1].matches(str[0] + "\\w{1}")){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
4,
18,
13,
4,
18,
13,
17,
2,
4,
18,
13,
17,
30,
14,
2,
2,
4,
18,
13,
17,
4,
18,
13,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
63,
5
],
[
63,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
23,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
22,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
38,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
46,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
6,
60
],
[
60,
61
],
[
0,
62
],
[
62,
63
],
[
62,
64
]
] |
[
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String s = scanner.next();",
"s",
"scanner.next()",
"scanner.next",
"scanner",
"String t = scanner.next();",
"t",
"scanner.next()",
"scanner.next",
"scanner",
"if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"s.equals(t.substring(0, t.length() - 1))",
"s.equals",
"s",
"t.substring(0, t.length() - 1)",
"t.substring",
"t",
"0",
"t.length() - 1",
"t.length()",
"t.length",
"t",
"1",
"{\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }",
"s.length() + 1 == t.length()",
"s.length() + 1",
"s.length()",
"s.length",
"s",
"1",
"t.length()",
"t.length",
"t",
"{\n System.out.println(\"Yes\");\n return;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.next();\n String t = scanner.next();\n if (s.equals(t.substring(0, t.length() - 1))) {\n if (s.length() + 1 == t.length()) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n /*\n long a = scanner.nextInt();\n long b = scanner.nextInt();\n long c = scanner.nextInt();\n long k = scanner.nextInt();\n if (a + b >= k) {\n System.out.println(a);\n }else {\n System.out.println(a - (k - (a + b)));\n }\n\n */\n }\n}",
"Main"
] |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String s = scanner.next();
String t = scanner.next();
if (s.equals(t.substring(0, t.length() - 1))) {
if (s.length() + 1 == t.length()) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
/*
long a = scanner.nextInt();
long b = scanner.nextInt();
long c = scanner.nextInt();
long k = scanner.nextInt();
if (a + b >= k) {
System.out.println(a);
}else {
System.out.println(a - (k - (a + b)));
}
*/
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
17,
13,
14,
4,
18,
13,
13,
30,
14,
2,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
8,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
34,
38
],
[
8,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
39,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
48,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
45,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
39,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] |
[
"import java.util.Scanner;\npublic class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String str1=sc.nextLine();",
"str1",
"sc.nextLine()",
"sc.nextLine",
"sc",
"String str2=sc.nextLine();",
"str2",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int m=str1.length();",
"m",
"str1.length()",
"str1.length",
"str1",
"int n=str2.length();",
"n",
"str2.length()",
"str2.length",
"str2",
"String new_str2=str2.substring(0,m);",
"new_str2",
"str2.substring(0,m)",
"str2.substring",
"str2",
"0",
"m",
"if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }",
"str1.equals(new_str2)",
"str1.equals",
"str1",
"new_str2",
"{\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"n==m+1",
"n",
"m+1",
"m",
"1",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc=new Scanner(System.in);\n String str1=sc.nextLine();\n String str2=sc.nextLine();\n int m=str1.length();\n int n=str2.length();\n String new_str2=str2.substring(0,m);\n if(str1.equals(new_str2)){\n if(n==m+1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
String str1=sc.nextLine();
String str2=sc.nextLine();
int m=str1.length();
int n=str2.length();
String new_str2=str2.substring(0,m);
if(str1.equals(new_str2)){
if(n==m+1){
System.out.println("Yes");
}else{
System.out.println("No");
}
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
29,
4,
18,
18,
13,
13,
17,
4,
18,
13,
29,
23,
13,
10,
6,
13
] |
[
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
71,
5
],
[
71,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
22,
32
],
[
32,
33
],
[
33,
34
],
[
22,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
47,
54
],
[
54,
55
],
[
55,
56
],
[
47,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
8,
67
],
[
6,
68
],
[
68,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
]
] |
[
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"String oldID = scan.nextLine();",
"oldID",
"scan.nextLine()",
"scan.nextLine",
"scan",
"String newID = scan.nextLine();",
"newID",
"scan.nextLine()",
"scan.nextLine",
"scan",
"for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < oldID.length()",
"i",
"oldID.length()",
"oldID.length",
"oldID",
"i++",
"i++",
"i",
"{\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }",
"{\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }",
"if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }",
"oldID.charAt(i) != newID.charAt(i)",
"oldID.charAt(i)",
"oldID.charAt",
"oldID",
"i",
"newID.charAt(i)",
"newID.charAt",
"newID",
"i",
"{\n System.out.println(\"No\");\n scan.close();\n return;\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scan.close()",
"scan.close",
"scan",
"return;",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"scan.close()",
"scan.close",
"scan",
"return;",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String oldID = scan.nextLine();\n String newID = scan.nextLine();\n\n for(int i = 0; i < oldID.length(); i++) {\n if(oldID.charAt(i) != newID.charAt(i)) {\n System.out.println(\"No\");\n scan.close();\n return;\n }\n }\n System.out.println(\"Yes\");\n scan.close();\n return;\n }\n}",
"Main"
] |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String oldID = scan.nextLine();
String newID = scan.nextLine();
for(int i = 0; i < oldID.length(); i++) {
if(oldID.charAt(i) != newID.charAt(i)) {
System.out.println("No");
scan.close();
return;
}
}
System.out.println("Yes");
scan.close();
return;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.