목록Solution/Python (117)
개발자 뺚
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 Wyobraźmy sobie przez chwilę, że w tym roku konkurs SKI'10 składa się z n punktowanych rund i jednej rundy próbnej. Ile zgodnie z regulaminem może się pojawić zadań w czasie całych zawodów? 입력 W pierwszej i jedynej linii znajduje się liczba naturalna n (1
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 Julka zaskoczyła wczoraj w przedszkolu swoją wychowawczynię rozwiązując następującą zagadkę: Klaudia i Natalia mają razem 10 jabłek, ale Klaudia ma o 2 jabłka więcej niż Natalia. Ile jabłek ma każda z dziewczynek? Julka odpowiedziała bez namysłu: Klaudia ma sześć jabłek, natomiast Natalia ma cztery jabłka. Wychowywaczyni postanowiła sprawdzić, czy odpowiedź Julki n..
시간 제한 : 1 초 메모리 제한 : 256 MB 문제 JOI군은 카드 게임을 하고 있다. 이 카드 게임은 5회의 게임으로 진행되며, 그 총점으로 승부를 하는 게임이다. JOI군의 각 게임의 득점을 나타내는 정수가 주어졌을 때, JOI군의 총점을 구하는 프로그램을 작성하라. 입력 표준 입력에서 다음과 같은 데이터를 읽어온다.i 번째 줄(1 ≤ i ≤ 5)에는 정수 Ai가 적혀있다. 이것은 i번째 게임에서의 JOI군의 점수를 나타낸다. 출력 표준 출력에 JOI군의 총점을 한 줄로 출력하라. 서브태스크 번호배점제한1200 ≤ Ai ≤ 10.280추가적인 제약 조건이 없다.scores = [int(input()) for _ in range(5)] print(sum(scores))
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 Given two integers, calculate and output their sum. 입력 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 (−10^9 ≤ x, y ≤ 10^9). 출력 For each test case output output the sum of the corresponding integers. n = in..
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 In the story Goldilocks and the Three Bears, each bear had a bowl of porridge to eat while sitting at his/her favourite chair. What the story didn’t tell us is that Goldilocks moved the bowls around on the table, so the bowls were not at the right seats anymore. The bowls can be sorted by weight with the lightest bowl being the Baby Bear’s bowl, the medium bowl bei..
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 A pyramid of blocks is constructed by first building a base layer of n blocks and then adding n-1 blocks to the next layer. This process is repeated until the top layer only has one block. You must calculate the number of blocks needed to construct a pyramid given the size of the base. For example, a pyramid that has a base of size 4 will need a total of 10 blocks...
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 스타워즈에 등장하는 로봇인 C3PO는 요즘 콜센터에 근무하고 있다. 콜센터에 앉아있는 C3PO를 그리는 프로그램을 작성하시오. 출력 예제 출력처럼 콜센터에 앉아있는 C3PO를 출력한다. 마지막 세 줄의 두 '|' 사이에는 공백이 10개 있다. print(" /~\\") print(" ( oo|") print(" _\\=/_") print(" / _ \\") print(" //|/.\\|\\\\") print(" || \\ / ||") print("============") print("| |") print("| |") print("| |")
시간 제한 : 1 초 메모리 제한 : 128 MB 문제 사파리월드는 인터넷으로만 존재하는 미스테리한 나라이다. 사파리월드에는 2개의 서브도메인이 seunghwan.royal.gov.sw와 kyuhyun.royal.gov.sw 이 있는데, 이것이 couple.royal.gov.sw으로 합쳐질 것이다. 그러나 도메인 관리 센터 SWNIC(센터장: 김동규)에는 엄격한 룰이 있다. 두 서브도메인을 합칠 때, 유명도의 차이가 너무 차이나지 않을 경우에만 두 서브도메인을 결혼시키는 것이다. 서브도메인의 유명도는 정수이다. 두 서브도메인의 유명도가 주어졌을 때, 그 차이를 구하는 프로그램을 작성하시오. 입력 첫째 줄에 두 도메인의 유명도 N과 M이 주어진다. (-2,000,000,000 ≤ N, M ≤ 2,000,0..