Skip to content

Instantly share code, notes, and snippets.

@JorgeOlvera
JorgeOlvera / TraversingGrid
Created December 2, 2013 06:21
TraversingGrid
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();
/*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.
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++){
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;
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;
@JorgeOlvera
JorgeOlvera / sum2
Created December 2, 2013 06:28
Sum Program
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;
@JorgeOlvera
JorgeOlvera / Fibonnaci Sequence
Created January 20, 2014 04:19
Fibonnaci Sequence
//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
@JorgeOlvera
JorgeOlvera / Fibonnaci
Created January 21, 2014 00:02
Fibonnaci Sequence 2
//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;
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];
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];