1
2
3
4
5
6
7
8
9
10
11
|
n=int(input())
for _ in range(n):
a, b, c = map(int, input().split())
cnt = 0
for x in range(1,a+1) :
for y in range(1, b + 1):
for z in range(1, c + 1):
if x%y==y%z and y%z == z%x :
cnt+=1
print(cnt)
|
cs |
3중 아니 정확히하면 4중 반복문.. 좀 꺼림직합니다
반응형
'python-algorithm' 카테고리의 다른 글
codeforces 1722A - Spell Check (0) | 2022.09.06 |
---|---|
codeforces 1722B - Colourblindness (0) | 2022.09.06 |
codeforces 1714C - Minimum Varied Number (0) | 2022.08.18 |
백준 4589 Gnome Sequencing (0) | 2022.08.02 |
백준 4696 St. Ives (0) | 2022.08.02 |
댓글