(SPOJ) 8697 - Pneu - Solução
import java.io.*;
import java.util.*;
import java.lang.Math;
import java.math.*;
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 {
String line = "";
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
line = br.readLine();
StringTokenizer tokenizer = new StringTokenizer(line);
int valor1 = Integer.valueOf(tokenizer.nextToken());
line = br.readLine();
tokenizer = new StringTokenizer(line);
int valor2 = Integer.valueOf(tokenizer.nextToken());
System.out.println(valor1-valor2);
return;
}
}
import java.util.*;
import java.lang.Math;
import java.math.*;
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 {
String line = "";
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
line = br.readLine();
StringTokenizer tokenizer = new StringTokenizer(line);
int valor1 = Integer.valueOf(tokenizer.nextToken());
line = br.readLine();
tokenizer = new StringTokenizer(line);
int valor2 = Integer.valueOf(tokenizer.nextToken());
System.out.println(valor1-valor2);
return;
}
}
Comments
Post a Comment