관리 메뉴

솜씨좋은장씨

[BaekJoon] 10480번 : Oddities (Python) 본문

Programming/코딩 1일 1문제

[BaekJoon] 10480번 : Oddities (Python)

솜씨좋은장씨 2023. 3. 17. 23:52
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 백준의 Oddities 입니다.

 

10480번: Oddities

Some numbers are just, well, odd. For example, the number 3 is odd, because it is not a multiple of two. Numbers that are a multiple of two are not odd, they are even. More precisely, if a number n can be expressed as n = 2 ∗ k for some integer k, then n

www.acmicpc.net

👨🏻‍💻 코드 ( Solution )

def oddities(n):
    return f"{n} is even" if n % 2 == 0 else f"{n} is odd"


if __name__ == "__main__":
    for _ in range(int(input())):
        n = int(input())
        print(oddities(n=n))
 

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07

1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.

github.com

Comments