This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Watermelon | |
| { | |
| public static void main(String[] args) | |
| { | |
| int w; | |
| Scanner input = new Scanner(System.in); | |
| w=input.nextInt(); | |
| if(w>2) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Square | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner x = new Scanner(System.in); | |
| double l=x.nextInt(); | |
| double b=x.nextInt(); | |
| double s=x.nextInt(); | |
| System.out.println((long)(Math.ceil(l/s)*Math.ceil(b/s))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class waytoolongwords | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| int num=ip.nextInt(); | |
| String[] str = new String[num]; | |
| for(int i=0;i<num;i++) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class DominoPiling | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| double a=ip.nextInt(); | |
| double b=ip.nextInt(); | |
| double c=a*b; | |
| System.out.println((int)Math.floor(c/2)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Bitplusplus | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| int num = ip.nextInt(); | |
| int x=0; | |
| String a = "++X"; | |
| String b = "X++"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class WordCapitalization | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| String x = ip.next(); | |
| StringBuffer buf = new StringBuffer(x); | |
| System.out.println(buf.substring(0, 1).toUpperCase()+buf.substring(1)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class PetyaStrings | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| String x=ip.next(); | |
| String y=ip.next(); | |
| int z = x.compareToIgnoreCase(y); | |
| if(z==0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class NextRound | |
| { | |
| public static void main(String[] args) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| int count = 0; | |
| int n = ip.nextInt(); | |
| int k = ip.nextInt(); | |
| int[] a = new int[n+1]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class StringTask | |
| { | |
| public static void main(String []args) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| char[] ch = new char[100]; | |
| char[] v = {'a','e','i','o','u','y'}; | |
| String s = ip.next().toLowerCase().replaceAll("[aeiouyAEIOUY]", ""); | |
| StringBuilder sb = new StringBuilder(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| public class Team | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner ip = new Scanner(System.in); | |
| int x=ip.nextInt(); | |
| int ctr=0,s=0; | |
| int[] a = new int[3]; | |
| int[] b = new int[1001]; |