MapleStory Finger Point

๐Ÿƒ‍โ™‚๏ธBaekjoon/Java

[2884/JAVA] ์•Œ๋žŒ ์‹œ๊ณ„

HYEJU01 2021. 9. 3. 03:36
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();

//45 +
if (b >= 45) {
	b-=45;
	System.out.printf("%d %d", a ,b);
}

else if (a  == 0) {
	a += 23;
	b = (60+b)-45;
    System.out.printf("%d %d", a ,b);
}

else  {
    a -= 1;
    b = (60+b)-45;
	System.out.printf("%d %d", a ,b);
}

}
}

์กฐ๊ฑด๋งŒ ์ž˜ ์ƒ๊ฐํ•ด์„œ ์ฝ”๋”ฉํ•ด์ฃผ๋ฉด ๋ ๋“ฏ !