Posts

(SPOJ) 20002 - Vestibular - Solução

Image
import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();         System.exit(0);     }     static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;         while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;         }         while (true) {       ...

(SPOJ) 19953 - Cartas - Solução

Image
import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();         System.exit(0);     }     static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;         while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;         }         while (true) {        ...

(SPOJ) 19987 - Ansiedade - Solução

import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();                 System.exit(0);     }         void processa() throws NumberFormatException, IOException {         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));         BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));                 String line = "";                 int contaTriagem = 0;       ...

(SPOJ) 20007 - Receita de Bolo - Solução

Image
import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();                 System.exit(0);     }         static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;                  while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;       ...

(SPOJ) 19766 - Arqueólogo Ruim de Matemática - Solução

import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();                 System.exit(0);     }         static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;         int sinal = 1;         while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;        ...

(SPOJ) 20668 - Ajude Aparecido - Solução

Image
import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();                 System.exit(0);     }         static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;                  while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;       ...

(SPOJ) 20006 - Desafio do Maior Número - Solução

import java.io.*; import java.util.*; class Main {     public static void main(String[] args) throws NumberFormatException, IOException {         Main processando = new Main();         processando.processa();                 System.exit(0);     }         static int leitor(BufferedReader br) throws NumberFormatException, IOException {         int n;         int resp = 0;                  while (true) {             n = br.read();             if (n >= '0' && n <= '9') break;         }  ...