A - Simple Math 2
Editorial
/


Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
正整数 が与えられます。 を で割った余りを求めてください。
について
は、 を超えない最大の整数を表します。例としては次のようになります。制約
入力
入力は以下の形式で標準入力から与えられる。
出力
答えを出力せよ。
入力例 1Copy
Copy
1 2
出力例 1Copy
Copy
1
なので、 を で割った余りの を出力します。
入力例 2Copy
Copy
2 7
出力例 2Copy
Copy
0
入力例 3Copy
Copy
1000000000000000000 9997
出力例 3Copy
Copy
9015
Score : points
Problem Statement
Given positive integers and , find the remainder when is divided by .
What is ?
denotes the greatest integer not exceeding . For example:Constraints
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1Copy
Copy
1 2
Sample Output 1Copy
Copy
1
We have , so we should print the remainder when is divided by , that is, .
Sample Input 2Copy
Copy
2 7
Sample Output 2Copy
Copy
0
Sample Input 3Copy
Copy
1000000000000000000 9997
Sample Output 3Copy
Copy
9015