728x90
https://www.acmicpc.net/problem/1075
1075번: 나누기
첫째 줄에 N, 둘째 줄에 F가 주어진다. N은 100보다 크거나 같고, 2,000,000,000보다 작거나 같은 자연수이다. F는 100보다 작거나 같은 자연수이다.
www.acmicpc.net
// 코드
1
|
import java.util.*;interface Main{static void main(String[]a){Scanner s=new Scanner(System.in);int N=s.nextInt(),F=s.nextInt();System.out.printf("%02d",(F-(N-N%100)%F)%F);}}
|
cs |
반응형