Mai intai trebuie sa te autentifici.
Cod sursa(job #2122423)
Utilizator | Data | 5 februarie 2018 03:24:44 | |
---|---|---|---|
Problema | A+B | Scor | 0 |
Compilator | java | Status | done |
Runda | Arhiva de probleme | Marime | 0.8 kb |
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
BufferedWriter fileOut;
Scanner
sc = new Scanner(new File("adunare.in"));
int a = sc.nextInt();
int b = sc.nextInt();
int result = a + b;
fileOut = new BufferedWriter(new FileWriter("adunare.out"));
if(a < 1000000000 && b < 1000000000){
fileOut.write(String.valueOf(result));
}
fileOut.newLine();
fileOut.close();
}
}