Notice
Recent Posts
Recent Comments
Link
목록1111 (1)
나의 개발일지
문제 : https://www.acmicpc.net/problem/1111 완전 탐색 알고리즘 예외) A인 경우 n == 1 n == 2 and 두 수가 다른 경우 반복문 i와 j의 범위는 질문 게시판을 통해 알아냄.. n = int(input()) test = list(map(int, input().split())) if n == 2 and test[0] != test[1] or n == 1: print('A') exit() for i in range(-200, 201): for j in range(-20000, 20001): if test[0] * i + j == test[1]: sw = 0 for k in range(n-1): if test[k] * i + j != test[k+1]: sw = 1 ..
백준
2023. 9. 4. 19:13