10430번 : 나머지 - Python

Pobi·2023년 1월 31일
0

PS

목록 보기
37/107

문제

https://www.acmicpc.net/problem/10430

풀이

문제에 있는 그대로 첫째 줄에 (A+B)%C, 둘째 줄에 ((A%C) + (B%C))%C, 셋째 줄에 (A×B)%C, 넷째 줄에 ((A%C) × (B%C))%C를 출력한다.

코드

from sys import stdin

input = stdin.readline

A, B, C = map(int,input().split())

print((A+B)%C)
print(((A%C) + (B%C))%C)
print((A*B)%C)
print(((A%C) * (B%C))%C)


profile
꿈 많은 개발자

0개의 댓글