ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ 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
'dev > algorithm' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
BOJ / 1330๋ฒ / ๋ ์ ๋น๊ตํ๊ธฐ [Go] [Python3] (0) | 2020.03.15 |
---|---|
BOJ / 2588๋ฒ / ๊ณฑ์ [Go] [Python3] (0) | 2020.03.14 |
BOJ / 10869๋ฒ / ์ฌ์น์ฐ์ฐ [Go] [Python3] (0) | 2020.03.14 |
BOJ / 1008๋ฒ / A/B [Go] [Python3] (0) | 2020.03.14 |
BOJ / 10998๋ฒ / AรB [Go] [Python3] (0) | 2020.03.13 |
๋๊ธ
๊ธ ๋ณด๊ดํจ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
TAG
- BFS
- ๋งฅ๋ถ
- MongoDB
- ๋ถํ ์ ๋ณต
- ๋ชฝ๊ณ ๋๋น
- ํด์๋งต
- dfs
- ์๊ณ ๋ฆฌ์ฆ
- ํ๋ก์ด๋์์ฌ
- python3
- Golang
- ballet
- ์ด๋ถํ์
- dp
- ์๋ฐ
- AWS
- ๋ธ๋ฃจํธํฌ์ค
- ๋ฐฑ์ค
- ๋งฅ๋ถํ๋ก
- ์๊ฐ๊ต์ฒด
- Macbook pro 2012 mid 13
- go
- ์คํ
- ํ
- java
- Algorithm
- baekjoon
- BOJ
- ๋ฐ๋
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- Total
- Today
- Yesterday