-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava.java
More file actions
44 lines (36 loc) · 1.06 KB
/
Copy pathjava.java
File metadata and controls
44 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
boolean oj = System.getProperty("ONLINE_JUDGE") != null;
Reader reader = oj ? new InputStreamReader(System.in) : new FileReader("input.txt");
Writer writer = oj ? new OutputStreamWriter(System.out) : new FileWriter("output.txt");
StreamTokenizer in = new StreamTokenizer(new BufferedReader(reader));
PrintWriter out = new PrintWriter(writer);
import java.io.*;
import java.util.*;
public class SumDif
{
public static void main(String[] args) throws IOException
{
new SumDif().run();
}
StreamTokenizer in;
PrintWriter out;
int nextInt() throws IOException
{
in.nextToken();
return (int)in.nval;
}
void run() throws IOException
{
in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));
out = new PrintWriter(new OutputStreamWriter(System.out));
solve();
out.flush();
}
void solve() throws IOException
{
int a = nextInt();
int b = nextInt();
out.print(a + b);
out.print(" ");
out.println(a - b);
}
}