문제 26711번: A+B (acmicpc.net) 26711번: A+B Mamy dla was zadanie stare jak świat, ale w nieco odświeżonej wersji. Polega ono na dodaniu do siebie dwóch liczb, które tym razem mogą być dość duże. Gdyby tylko na Potyczkach Algorytmicznych było jakieś narzędzie, które pomaga radzić sobie www.acmicpc.net 풀이 숫자 두개를 입력 받고, 이를 더한 값을 출력하는 문제입니다. 오랜만에 나온 A+B 문제내요. A = int(input()) B = int(input()) print(A +..
사칙연산

문제 5341번: Pyramids (acmicpc.net) 5341번: Pyramids The input will be a sequence of integers, one per line. The end of input will be signaled by the integer 0, and does not represent the base of a pyramid. All integers, other than the last (zero), are positive. www.acmicpc.net 풀이 숫자가 주어지면, 몇개의 사각형이 필요하는지를 구하는 문제입니다. 위는 4를 입력했을 때의 피라미드 모양입니다. 총 10개로, 1+2+3+4임을 알 수 있습니다. for문을 이용하면 쉽게 풀 수 있습니다. #incl..
5063번: TGN (acmicpc.net) 5063번: TGN 첫째 줄에 테스트 케이스의 개수 N이 주어진다. 다음 N개의 줄에는 3개의 정수 r, e, c가 주어진다. r은 광고를 하지 않았을 때 수익, e는 광고를 했을 때의 수익, c는 광고 비용이다. (-106 ≤ r,e ≤ 106 www.acmicpc.net N = int(input()) for _ in range(N) : r, e, c = map(int, input().split()) if r > e - c: print("do not advertise") elif r == e - c : print("does not matter") else : print("advertise") 풀이 단순한 상식 문제입니다.