공부기록/백준
[백준] 2525번: 오븐 시계 , 10757번: 큰 수 A+B
메델
2023. 2. 1. 21:02
1. 2525번: 오븐 시계
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int a = scanner.nextInt();
int b = scanner.nextInt();
int c = scanner.nextInt();
scanner.close();
int time = (a*60)+b+c;
int hour = time/60;
if(hour >= 24) {
hour= hour-24;
}
System.out.println(hour + " "+ (time %60));
}
}
2. 10757번: 큰 수 A+B
import java.util.Scanner;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
BigInteger a = scanner.nextBigInteger();
BigInteger b = scanner.nextBigInteger();
scanner.close();
System.out.print(a.add(b));
}
}