088 - Simple Math
Editorial
/


Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
つの正整数 が与えられます。
を で割った余りを求めてください。
制約
入力
入力は以下の形式で標準入力から与えられる。
出力
求めた値を で割った余りを出力せよ。
入力例 1Copy
Copy
1 2 3
出力例 1Copy
Copy
18
となります。
入力例 2Copy
Copy
1000000000 987654321 123456789
出力例 2Copy
Copy
951633476
で割った余りを求めることに注意してください。
Score : points
Problem Statement
Given are three positive integers , , and . Compute the following value modulo :
Constraints
Input
Input is given from standard input in the following format:
Output
Print the value modulo .
Sample Input 1Copy
Copy
1 2 3
Sample Output 1Copy
Copy
18
We have: .
Sample Input 2Copy
Copy
1000000000 987654321 123456789
Sample Output 2Copy
Copy
951633476
Be sure to compute the value modulo .