Skip to content

Commit ef2ac82

Browse files
authored
Merge pull request #4548 from shuklaji23/master
Solutions added - cf-4A.mdx
2 parents 980b495 + 5c21796 commit ef2ac82

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

solutions/general/cf-4A.mdx

+35-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
id: cf-4A
33
source: CF
44
title: Watermelon
5-
author: Junwon Kim
5+
author: Junwon Kim, Ayush Shukla
66
---
77

88
[Official Analysis (C++)](https://codeforces.com/blog/entry/95249)
@@ -34,4 +34,38 @@ int main() {
3434
```
3535

3636
</CPPSection>
37+
<JavaSection>
38+
39+
```java
40+
import java.io.*;
41+
import java.util.*;
42+
43+
public class Watermelon {
44+
public static void main(String[] args) {
45+
Kattio io = new Kattio();
46+
int w = io.nextInt();
47+
if (w % 2 == 0 && w > 2) {
48+
io.println("YES");
49+
} else {
50+
io.println("NO");
51+
}
52+
io.close();
53+
}
54+
55+
// CodeSnip{Kattio}
56+
}
57+
```
58+
59+
</JavaSection>
60+
<PySection>
61+
62+
```py
63+
w = int(input())
64+
if w % 2 == 0 and w > 2:
65+
print("YES")
66+
else:
67+
print("NO")
68+
```
69+
70+
</PySection>
3771
</LanguageSection>

0 commit comments

Comments
 (0)