-
[java]백준 나머지 10430번알고리즘 문제풀이/백준(자바) 2023. 3. 22. 23:39
코드
import java.util.Scanner; public class BOJ_10430 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int a =in.nextInt(); int b =in.nextInt(); int c =in.nextInt(); System.out.println((a+b)%c); System.out.println(((a%c)+(b%c))%c); System.out.println((a*b)%c); System.out.println(((a%c)*(b%c))%c); in.close(); } }
링크
https://www.acmicpc.net/problem/10430
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 단어 길이 재기 2743번 (0) 2023.03.23 [java]백준 달팽이는 올라가고 싶다 2869번 (0) 2023.03.23 [java]백준 주사위 세개 2480번 (0) 2023.03.21 [java]백준 상수 2908번 (0) 2023.03.21 [java]백준 A×B 10998번 (0) 2023.03.20