ํฐ์คํ ๋ฆฌ ๋ทฐ
๐ฉ๐ป๐ป ๋ฌธ์
โ๐ป ํ์ด
๐จ 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
- dp
- AWS
- ๋งฅ๋ถ
- dfs
- ์ด๋ถํ์
- python3
- ํ๋ก์ด๋์์ฌ
- ๋ธ๋ฃจํธํฌ์ค
- ํด์๋งต
- ๋ถํ ์ ๋ณต
- baekjoon
- ์๊ฐ๊ต์ฒด
- ๋ฐฑ์ค
- java
- ๋ชฝ๊ณ ๋๋น
- Golang
- ballet
- ๋ฐ๋
- ์คํ
- Macbook pro 2012 mid 13
- go
- BOJ
- Algorithm
- ํ
- ์๊ณ ๋ฆฌ์ฆ
- ๋งฅ๋ถํ๋ก
- ๋งฅ๋ถ ์ ๊ทธ๋ ์ด๋
- MongoDB
- Total
- Today
- Yesterday