Skip to content

Instantly share code, notes, and snippets.

View Jack-Saleem's full-sized avatar
🎯
Focusing

Jack-Saleem

🎯
Focusing
  • StateStreet
  • Hyderabad
View GitHub Profile
@Jack-Saleem
Jack-Saleem / AmusingJoke.java
Created December 21, 2016 17:41
codeforces 141A Amusing Joke program in java
import java.util.Scanner;
public class AmusingJoke
{
public static void main(String[] args)
{
Scanner z = new Scanner(System.in);
String s = z.nextLine().toLowerCase();
String n = z.nextLine().toLowerCase();
String p = z.nextLine().toLowerCase();
@Jack-Saleem
Jack-Saleem / LinelandMail.java
Created December 21, 2016 17:38
codeforces 567A Lineland Mail program in java
import java.util.Scanner;
public class LinelandMail
{
static int sub(int a,int b){
if(a >= 0 && b >= 0){
return Math.abs(a-b);
}else if(a <= 0 && b <= 0){
return Math.abs((a*-1)-(b*-1));
}else if(a >= 0 && b <= 0){
@Jack-Saleem
Jack-Saleem / LinkOrCutTree.java
Last active July 17, 2016 14:08
codeforces 614A LinkOrCutTree program in java
import java.math.BigInteger;
import java.util.Scanner;
public class LinkOrCutTree
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
BigInteger bl=new BigInteger(z.next());
BigInteger br=new BigInteger(z.next());
@Jack-Saleem
Jack-Saleem / TheChildandHomework.java
Created July 17, 2016 13:58
codeforces 437A TheChildandHomework program in java
import java.util.Scanner;
public class TheChildandHomework
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
int[] a=new int[4];
for(int i=0;i<a.length;i++)
a[i]=z.nextLine().length()-2;
int k1=0;
@Jack-Saleem
Jack-Saleem / PanoramixsPrediction.java
Created July 17, 2016 13:57
codeforces 80A PanoramixsPrediction program in java
import java.util.Scanner;
public class PanoramixsPrediction
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
int n=z.nextInt();
int m=z.nextInt();
int a=0;
@Jack-Saleem
Jack-Saleem / ComparingTwoLongIntegers.java
Created July 17, 2016 13:56
codeforces 616A ComparingTwoLongIntegers program in java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class ComparingTwoLongIntegers
{
public static void main(String[] args)
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String x=null;
@Jack-Saleem
Jack-Saleem / HexadecimalsTheorem.java
Created July 17, 2016 13:55
codeforces 199A HexadecimalsTheorem program in java
import java.util.Scanner;
public class HexadecimalsTheorem
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
int n=z.nextInt();
if(n==0)
System.out.println("0"+" 0 "+"0");
else if(n==1)
@Jack-Saleem
Jack-Saleem / WeirdCryptography.java
Created July 17, 2016 13:54
codeforces 100935B WeirdCryptography program in java
import java.util.Scanner;
public class WeirdCryptography
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
String ans="";
int cas=1;
while(true)
{
@Jack-Saleem
Jack-Saleem / OCR.java
Created July 17, 2016 13:53
codeforces 100935C OCR program in java
import java.util.Scanner;
public class OCR
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
int n=z.nextInt();
int temp=0;
String op="";
int cnt=1;
@Jack-Saleem
Jack-Saleem / Time.java
Created July 17, 2016 13:51
codeforces 100935A Time program in java
import java.util.Scanner;
public class Time
{
public static void main(String[] args)
{
Scanner z=new Scanner(System.in);
int n=z.nextInt();
int[] ar=new int[n*6];
for(int i=0;i<ar.length;i++)
ar[i]=z.nextInt();