목록math (2)
취미가 좋다
https://atcoder.jp/contests/abc215/tasks/abc215_d D - Coprime 2 AtCoder is a programming contest site for anyone from beginners to experts. We hold weekly programming contests online. atcoder.jp 주어진 범위 내에서, 주어진 수들과 모두 서로소(최대공약수가 1)가 되는 값를 찾는 문제이다. Solution N,M = map(int,input().split()) A = list(map(int,input().split())) maxA = max(max(A),M) k = [True] * (maxA+1) isprime = [True] * (maxA+1) prim..

https://leetcode.com/problems/rotate-array/ Rotate Array - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: nums = [1,2,3,4,5,6,7], k = 3 Output: [5,6,7,1,2,3,4] Explanation: rotate ..