ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

๐Ÿ‘ฉ๐Ÿป‍๐Ÿ’ป ๋ฌธ์ œ

 

10430๋ฒˆ: ๋‚˜๋จธ์ง€

์ฒซ์งธ ์ค„์— A, B, C๊ฐ€ ์ˆœ์„œ๋Œ€๋กœ ์ฃผ์–ด์ง„๋‹ค. (2 ≤ A, B, C ≤ 10000)

www.acmicpc.net


โœ๐Ÿป ํ’€์ด

๐ŸŽจ Go

package main

import "fmt"

func main() {
	var a, b, c int
	fmt.Scanf("%d %d %d", &a, &b, &c)
	fmt.Println((a + b) % c)
	fmt.Println((a%c + b%c) % c)
	fmt.Println((a * b) % c)
	fmt.Println((a % c * b % c) % c)
}

๐ŸŽจ Python3

import sys

a, b, c = sys.stdin.readline().split()
a, b, c = int(a), int(b), int(c)

print((a+b)%c)
print(((a%c)+(b%c))%c)
print((a*b)%c)
print((a%c)*(b%c)%c)
728x90
๋Œ“๊ธ€