본문 바로가기
반응형

사칙연산45

[백준/Python] Bronze V #20254 Site Score 20254번: Site Score Teams from variaous universities compete in ICPC regional contests for tickets to the ICPC World Finals. The number of tickets allocated to every regional contest may be different. The allocation method in our super region, Asia Pacific, is based on a para www.acmicpc.net 문제 Teams from variaous universities compete in ICPC regional contests for tickets to the ICPC World Finals.. 2023. 8. 18.
[백준/Python] Bronze V #18301 Rats 18301번: Rats To celebrate the Lunar New Year of the Rat, Douglas decides to count the number of rats living in his area. It is impossible for him to find all rats, as they tend to be well hidden. However, on the first day of the new year, Douglas manages to capture n1 www.acmicpc.net 문제 To celebrate the Lunar New Year of the Rat, Douglas decides to count the number of rats living in his area. It.. 2023. 8. 17.
[백준/Python] Bronze V #7891 Can you add this? 7891번: Can you add this? The input contains several test cases. The first line contains and integer t (t ≤ 100) denoting the number of test cases. Then t tests follow, each of them consisiting of two space separated integers x and y (−109 ≤ x, y ≤ 109). www.acmicpc.net 문제 Given two integers, calculate and output their sum. 입력 The input contains several test cases. The first line contains and int.. 2023. 8. 17.
[백준/Python] Bronze V #27433 팩토리얼 2 27433번: 팩토리얼 2 0보다 크거나 같은 정수 N이 주어진다. 이때, N!을 출력하는 프로그램을 작성하시오. www.acmicpc.net 문제 0보다 크거나 같은 정수 N이 주어진다. 이때, N!을 출력하는 프로그램을 작성하시오. 입력 첫째 줄에 정수 N(0 ≤ N ≤ 20)이 주어진다. 출력 첫째 줄에 N!을 출력한다. 풀이 import sys input = sys.stdin.readline n = int(input()) if n == 0 : print(1) else : result = 1 for i in range(2, n+1) : result *= i print(result) 2023. 8. 16.
[백준/Python] Bronze IV #25238 가희와 방어율 무시 25238번: 가희와 방어율 무시 메이플스토리 몬스터는 방어율 수치가 있습니다. 이 방어율 수치의 일정 %를 무시하는 것을 방무라고 합니다. 유저는 아이템을 사거나, 특정한 스킬 레벨을 올려서 방무 수치를 올릴 수 있습니 www.acmicpc.net 문제 메이플스토리 몬스터는 방어율 수치가 있습니다. 이 방어율 수치의 일정 %를 무시하는 것을 방무라고 합니다. 유저는 아이템을 사거나, 특정한 스킬 레벨을 올려서 방무 수치를 올릴 수 있습니다. 그렇게 해서, 유저가 체감하는 몬스터의 방어율 수치를 낮출 수 있습니다. 몬스터의 방어율이 200이고, 유저의 방무가 20이라면, 몬스터의 방어율 200의 20%를 무시하게 되므로, 40만큼 무시하게 됩니다. 즉, 160이 유저가 체감하는 방어율 수치가 됩니다. 유.. 2023. 8. 16.
반응형