본문 바로가기
python-algorithm

[백준] 2991

by 무적김두칠 2020. 12. 22.

1
2
3
4
5
6
7
8
9
10
11
12
13
import sys
a,b,c,d= (map(int, sys.stdin.readline().split()))
p,m,n=(map(int, sys.stdin.readline().split()))
cntp=0;cntm=0;cntn=0
if (p%(a+b))<=and p%(a+b)!=0: cntp+=1
if (p%(c+d))<=and p%(c+d)!=0: cntp+=1
if (m%(a+b))<=and m%(a+b)!=0: cntm+=1
if (m%(c+d))<=and m%(c+d)!=0: cntm+=1
if (n%(a+b))<=and n%(a+b)!=0: cntn+=1
if (n%(c+d))<=and n%(c+d)!=0: cntn+=1
print(cntp)
print(cntm)
print(cntn)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 3028  (0) 2020.12.23
[백준] 3009  (0) 2020.12.22
[백준] 2985  (0) 2020.12.22
[백준] 2959  (0) 2020.12.22
[백준] 2953  (0) 2020.12.22

댓글