From c1032afba1985e61e571838a73d1afb9d16fe99c Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Thu, 18 Dec 2025 20:59:40 +0900 Subject: [PATCH] baekjoon 20251218 --- code_study/Baekjoon/python/10699.py | 2 ++ code_study/Baekjoon/python/27172.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 code_study/Baekjoon/python/10699.py create mode 100644 code_study/Baekjoon/python/27172.py diff --git a/code_study/Baekjoon/python/10699.py b/code_study/Baekjoon/python/10699.py new file mode 100644 index 0000000..f7abdd1 --- /dev/null +++ b/code_study/Baekjoon/python/10699.py @@ -0,0 +1,2 @@ +from datetime import datetime as dt +print(str(dt.now())[:10]) \ No newline at end of file diff --git a/code_study/Baekjoon/python/27172.py b/code_study/Baekjoon/python/27172.py new file mode 100644 index 0000000..ece60bf --- /dev/null +++ b/code_study/Baekjoon/python/27172.py @@ -0,0 +1,20 @@ +import sys +input = sys.stdin.readline + +MAX_NUM = 1000001 +score = [0]*MAX_NUM +cards = [False]*MAX_NUM +nums = [] + +N = int(input()) +for n in map(int, input().split()) : + nums.append(n) + cards[n] = True + +for n in nums : + for i in range(n*2,MAX_NUM, n) : + if cards[i] : + score[n] += 1 + score[i] -= 1 + +print(' '.join(map(str, list(score[n] for n in nums)))) \ No newline at end of file