mirror of
https://github.com/tiennm99/codeforces.git
synced 2026-06-09 10:12:55 +00:00
[Init] Solved solutions
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.company;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// write your code here
|
||||
Scanner sc = new Scanner(System.in);
|
||||
String s = sc.next();
|
||||
s = s.toLowerCase();
|
||||
s = s.replaceAll("a", "");
|
||||
s = s.replaceAll("e", "");
|
||||
s = s.replaceAll("i", "");
|
||||
s = s.replaceAll("o", "");
|
||||
s = s.replaceAll("u", "");
|
||||
s = s.replaceAll("y", "");
|
||||
for (int i = 0; i < s.length(); i++)
|
||||
{
|
||||
System.out.print('.');
|
||||
System.out.print(s.charAt(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.company;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
long n = sc.nextInt();
|
||||
long m = sc.nextInt();
|
||||
long a = sc.nextInt();
|
||||
long r = n / a, c = m / a;
|
||||
if (n % a != 0)
|
||||
{
|
||||
r++;
|
||||
}
|
||||
if (m % a != 0)
|
||||
{
|
||||
c++;
|
||||
}
|
||||
long s = r * c;
|
||||
System.out.println(s);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.company;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int w = sc.nextInt();
|
||||
if (w > 2 && w % 2 == 0)
|
||||
{
|
||||
System.out.println("YES");
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("NO");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.company;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Main {
|
||||
|
||||
public static void main(String[] args) {
|
||||
// write your code here
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int m = sc.nextInt();
|
||||
int n = sc.nextInt();
|
||||
int out = m*n/2;
|
||||
System.out.print(out);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user