실험실
  • [백준] 30791번: gahui and sousenkyo 1 - 파이썬
    2024년 11월 13일 18시 11분 34초에 업로드 된 글입니다.
    작성자: B1NK
    728x90

    문제

    Gahui is watching the annual character election. After the election, The top 16 characters receive enormous benefits for one year because they belong to the Tier 1 (ranked 1st - 16th) section. For that reason, fans vote passionately to get their favorite characters into the top 16. Remarkably, at least one Cinderella appears in every election, achieving an outstanding outcome.

    입력

    Votes from the 16th-ranked character to the 20th-ranked character are given, separated by spaces.

    출력

    Print the answer to the question.

    코드

    l = list(map(int,input().split()))
    print(sum(map(lambda x:l[0] - x<1001,l)) - 1)
    728x90
    댓글