ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • 조건문
    백준 2022. 5. 18. 20:54

    #1

    a, b = map(int, input().split())
    if a > b:
        print(">")
    elif a < b:
        print("<")
    else:
        print("==")

     

     

    #2

    score = int(input())

    if score > 90 or score ==90:
        print("A")
    elif score >80 or score ==80:
        print("B")
    elif score >70 or score ==70:
        print("C")
    elif score >60 or score ==60:
        print("D")
    else:
        print("F")

     

     

    #3

    year = int(input())

    if year % 4 == 0:
        if year % 100 != 0 or year % 400 == 0:
            print(1)
        else:
            print(0)
    else:
        print(0)

     

     

    #4

    x = int(input())
    y = int(input())

    if x > 0 and y > 0:
        print(1)
    elif x > 0 and y < 0:
        print(4)
    elif x < 0 and y > 0:
        print(2)
    else:
        print(3)

     

     

    #5

    H, M = map(int, input().split())

    if M-45 > 0 or M-45 == 0:
        print(H, M-45)
    else:
        if H-1 < 0:
            print(23, M-45+60)
        else:
            print(H-1, M-45+60)

     

     

    #6

    H, M = map(int, input().split())
    time = int(input())

    time_H = time // 60
    time_M = time % 60

    new_H = H + time_H
    new_M = M + time_M

    if new_M > 60 or new_M==60:
        print((new_H+1)%24, new_M-60)
    else:
        print(new_H%24, new_M)

     

     

    #7

    x, y, z = map(int, input().split())

    if x == y == z:
        print(10000+x*1000)
    elif x == y or x == z:
        print(1000+x*100)
    elif y == z:
        print(1000+y*100)
    else:
        if x > y and x > z:
            print(x*100)
        elif y > x and y > z:
            print(y*100)
        else:
            print(z*100)

     

     

     

    '백준' 카테고리의 다른 글

    문자열  (0) 2022.05.18
    함수  (0) 2022.05.18
    1차원 배열  (0) 2022.05.18
    반복문  (0) 2022.05.18
    입출력과 사칙연산  (0) 2022.05.18

    댓글

Designed by Tistory.