-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathA.java
More file actions
66 lines (55 loc) · 950 Bytes
/
A.java
File metadata and controls
66 lines (55 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
public class A {
int f1(int x, int y) {
if (x < 500) {
if (x > 400) {
return x;
}
if (y - 2 == x && y > 300) {
return x + y;
}
if (x != y + 1) {
int sum = x + y; // x <= 400
} else {
if (y > 300) {
int sum = x + y; // 302 <= x <= 400, y = x - 1, 301 <= y <= 399
}
}
if (x > 500) {
return x;
}
}
return 0;
}
int f2(int x, int y, int z) {
if (x < 500) {
if (x > 400) {
return x;
}
if (y == x - 1 && y > 300 && y + 2 == z && z == 350) {
return x + y + z;
}
}
return 0;
}
int f3(char size) {
int i = 0;
while (i < size) {
i++;
}
return i;
}
int f4(int size) {
int i = 0;
while (i < size) {
i++;
}
return i;
}
int f5(char size) {
int i = 10;
while (i < size) {
i++;
}
return i;
}
}