반응형
# 1012
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
float f = sc.nextFloat();
String str = String.format("%.6f", f);
System.out.println(str);
}
}
# 1013
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(a + " " + b);
}
}
# 1014
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String chars = sc.nextLine();
char[] charArr = chars.toCharArray();
System.out.println(charArr[2] + " " + charArr[0]);
}
}
# 1015
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
float f = sc.nextFloat();
String str = String.format("%.2f", f);
System.out.println(str);
}
}
# 1017
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(n + " " + n + " " + n);
}
}
# 1018
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String time = sc.nextLine();
System.out.println(time);
}
}
# 1019
import java.util.Scanner;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String date = sc.nextLine();
StringTokenizer token = new StringTokenizer(date, ".");
int[] dates = new int[3];
int i = 0;
while (token.hasMoreTokens()) {
dates[i] = Integer.parseInt(token.nextToken());
i += 1;
}
String year = String.format("%04d", dates[0]);
String month = String.format("%02d", dates[1]);
String day = String.format("%02d", dates[2]);
System.out.println(year + "." + month + "." + day);
}
}
# 1020
import java.util.Scanner;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String num = sc.nextLine();
num = num.replace("-", "");
System.out.println(num);
}
}
# 1021
import java.util.Scanner;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String word = sc.nextLine();
System.out.println(word);
}
}
# 1022
import java.util.Scanner;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String word = sc.nextLine();
System.out.println(word);
}
}
반응형