You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
343 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <bits/stdc++.h>
using namespace std;
/*
NOIP
CCF 组织的赛事都可以了
__int128取值范围2^127~2^1271
__int128只能通过字符形式输入输出
*/
typedef long long LL;
LL a, b, p, res;
int main() {
cin >> a >> b >> p;
cout << (LL)(__int128(a) * (__int128)b % p) << endl;
return 0;
}