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 YoungPhysicist | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
int a=z.nextInt(); | |
int[] b=new int[a*3]; | |
int p=0,q=0,r=0; | |
for(int i=0;i<a*3;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 SoldierandBananas | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z=new Scanner(System.in); | |
int k=z.nextInt(); | |
int n=z.nextInt(); | |
int w=z.nextInt(); | |
int a=k*((w*(w+1))/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 Expression | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
int a=z.nextInt(); | |
int b=z.nextInt(); | |
int c=z.nextInt(); | |
if(a==1 && b==1 && c==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 GameWithSticks | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
int a=z.nextInt(); | |
int b=z.nextInt(); | |
if(Math.min(a, b)%2==0) | |
System.out.println("Malvika"); |
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 Translation | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
String a=z.next(); | |
String b=z.next(); | |
StringBuilder sb=new StringBuilder(b); | |
if(a.equals(sb.reverse().toString())) |
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.Arrays; | |
import java.util.Scanner; | |
import java.util.StringTokenizer; | |
public class HelpfulMaths | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
String x=z.next(); | |
int i,j; |
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 Dubstep | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
String a=z.next(); | |
System.out.println(a.replaceAll("WUB", " ").replaceAll(" +", " ").trim()); | |
} | |
} |
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 UltraFastMathametician | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner z=new Scanner(System.in); | |
String a=z.next(); | |
String b=z.next(); | |
char[] c=a.toCharArray(); | |
char[] d=b.toCharArray(); |
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 GeorgeAndAccomodation | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z = new Scanner(System.in); | |
int a=z.nextInt(); | |
int ctr=0; | |
int[] x=new int[2*a]; | |
int[] b=new int[2*a]; |
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 Evenodds | |
{ | |
public static void main(String args[]) | |
{ | |
Scanner z=new Scanner(System.in); | |
long n=z.nextLong(); | |
long k=z.nextLong(); | |
if(n%2==0) | |
{ |