목록GCD (1)
취미가 좋다
[215] D - Coprime 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..
알고리즘 문제풀이/AtCoder
2021. 8. 24. 11:00