-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
25 lines (18 loc) · 910 Bytes
/
Main.java
File metadata and controls
25 lines (18 loc) · 910 Bytes
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
package Tuple;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String[] line1 = reader.readLine().split("\\s+");
String[] line2 = reader.readLine().split("\\s+");
String[] line3 = reader.readLine().split("\\s+");
Tuple<String,String> tuple1 = new Tuple<>(line1[0] + " " + line1[1], line1[2]);
Tuple<String,Integer> tuple2 = new Tuple<>(line2[0], Integer.parseInt(line2[1]));
Tuple<Integer,Double> tuple3 = new Tuple<Integer, Double>(Integer.parseInt(line3[0]),Double.parseDouble(line3[1]));
System.out.println(tuple1.toString());
System.out.println(tuple2.toString());
System.out.println(tuple3.toString());
}
}