[백준]3003 Count Chess item

차보경·2022년 8월 27일
0

백준

목록 보기
4/20

문제

로직 정리

  1. space 기준으로 받은 값을 숫자형태로 변경
  2. 순서에 맞춰 print

알아야 할 것

작성 코드

def reaminder(A,B,C):
    print((A+B)%C)
    print(((A%C) + (B%C))%C)
    print((A*B)%C)
    print(((A%C) * (B%C))%C)

A,B,C = map(int,input().split(" "))
reaminder(A,B,C)

복기

  • 1차 작성 (틀림)
def count_chess(get_list):
    all_list = [1, 1, 2, 2, 2, 8]
    check_list = []
    for idx, num in enumerate(get_list):
        count = all_list[idx]- num
        check_list.append(count)
    print(check_list)


get_list = list(map(int,input().split(' ')))
count_chess(get_list)
profile
차보의 Data Engineer 도전기♥ (근데 기록을 곁들인)

0개의 댓글