반응형

1026번

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] times = br.readLine().split(":");

		if (times[1].length() > 1 && times[1].charAt(0) == '0') {
			System.out.println(times[1].charAt(1));
		} else {
			System.out.println(times[1]);
		}

	}
}

 

1027번

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] times = br.readLine().split("\\.");

		System.out.println(times[2] + "-" + times[1] + "-" + times[0]);

	}
}

 

1028번

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BigInteger bigInteger = new BigInteger(br.readLine());

		System.out.println(bigInteger);

	}
}

 

1029번

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BigDecimal bigDecimal = new BigDecimal(br.readLine());

		System.out.println(bigDecimal.setScale(11));

	}
}

 

 

1030번

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		BigInteger bigInteger = new BigInteger(br.readLine());

		System.out.println(bigInteger);

	}
}
반응형

+ Recent posts