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.io.*; | |
import java.util.Scanner; | |
public class TraversingGrid { | |
public static void main (String [] args) { | |
Scanner input = new Scanner(System.in); | |
int testcases = input.nextInt(); | |
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
/*General Election is over, now it is time to count the votes! | |
//There are n (2 <= n <= 5) candidates and m (1 <= m <= 100) vote regions. | |
//Given the number of votes for each candidate from each region, | |
//determine which candidate is the winner (one with the most votes. | |
//The first line of input contains an integer T (1 <= T <= 100), | |
//the number of test cases follow. Each test case starts with two | |
//integers n and m denoting the number of candidate and number of region. | |
//The next m lines each contains n integers, V1, V2, ..., Vn (0 <= Vi <= 1000) | |
//the number of votes for candidate 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.lang.Math.*; | |
import java.util.Scanner; | |
public class simpleDishes{ | |
public static void main(String [] args){ | |
Scanner input = new Scanner(System.in); | |
int int1 = input.nextInt(); | |
for(int int2 = 0; int2 < int1; int2++){ |
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; | |
import java.io.*; | |
import java.text.DecimalFormat; | |
public class financialManagement{ | |
public static void main(String [] args) { | |
Scanner input = new Scanner(System.in); | |
double[] money; |
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 static java.lang.Integer.*; | |
import static java.lang.Math.*; | |
import java.util.*; | |
import java.io.*; | |
public class zilla{ | |
public static void main(String[] args) throws Throwable{ | |
BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); | |
for(int c = 0, C = parseInt(in.readLine().trim()); c++ < C;){ | |
in.readLine();in.readLine(); | |
int limitzilla = 0, limitmecha = 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 sum2{ | |
public static void main (String[] args) { | |
Scanner input = new Scanner(System.in); | |
System.out.println("Introduce an interger"); | |
int limit = input.nextInt(); | |
int nueva = 0; | |
int nueva2 = 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
//1,1,2,3,5,8,13 | |
//Fn = Fn-1 + Fn-2 | |
import java.util.Scanner; | |
public class Fibonnaci { | |
public static void main (String[] args) { | |
int x = 1; | |
int 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
//1,1,2,3,5,8,13 | |
//Fn = Fn-1 + Fn-2 | |
import java.util.Scanner; | |
public class Fibonnaci { | |
public static void main (String[] args) { | |
int x = 1; | |
int z = 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; | |
import java.io.*; | |
public class arrayMerger { | |
public static void main(String [] args) { | |
Scanner input = new Scanner(System.in); | |
int [] array1 = new int [5]; | |
int [] array2 = new int [5]; |
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; | |
import java.io.*; | |
public class arrayReverser { | |
public static void main(String [] args) { | |
Scanner input = new Scanner(System.in); | |
int [] arrayA | |
= new int [5]; |