first commit

This commit is contained in:
Nyagami
2022-12-15 23:51:04 +07:00
commit 87d51fb251
292 changed files with 12623 additions and 0 deletions
@@ -0,0 +1,38 @@
import java.util.*;
public class Main {
static String toD(String s) {
String[] d = s.split("/");
for (int i = 0; i <= 1; i++) {
while (d[i].length() < 2)
d[i] = "0" + d[i];
}
return d[0] + "/" + d[1] + "/" + d[2];
}
static String stdName(String s) {
String[] n = s.toLowerCase().trim().split("\\s+");
String r = "";
for (int i = 0; i < n.length; i++) {
r = r + Character.toString(n[i].charAt(0)).toUpperCase() + n[i].substring(1) + " ";
}
return r;
}
static String msv(int i) {
String s = Integer.toString(i);
while (s.length() < 3)
s = "0" + s;
return "B20DCCN" + s;
}
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int i = 1; i <= t; i++) {
sc.nextLine();
System.out.printf("%s %s%s %s %.2f\n", msv(i), stdName(
sc.nextLine()), sc.nextLine(), toD(sc.next()), sc.nextFloat());
}
}
}