3048
-
[백준] 3048번 개미(python)Python/BAEKJOON 2022. 1. 19. 15:14
문제) 알고리즘) - g1과 g2 2개의 그룹으로 나누고 기준이 될 g1은 reverse 상태로 변환 후 result에 g1+g2로 저장 - 해당 초에 result 리스트 값을 반복해서 조건에 맞는 값을 자리 바꿈 - 진행 시간(num)과 입력 시간(time)이 같다면 종료 후 최종 출력 코드) import sys input = sys.stdin.readline g1_cnt, g2_cnt = map(int, input().split()) g1 = list(reversed(input().rstrip())) #진행방향에 맞게 reverse g2 = list(input().rstrip()) time = int(input()) result = g1 + g2 num = 0 #시간 기준 while num < tim..