modified: 3.cpp
This commit is contained in:
@@ -4,7 +4,7 @@ using namespace std;
|
||||
long long a, b, p;
|
||||
void put(__int128 a)
|
||||
{
|
||||
char c[40];
|
||||
char c[60];
|
||||
if (a == 0)
|
||||
puts("0");
|
||||
int tot = 0;
|
||||
@@ -22,7 +22,7 @@ void put(__int128 a)
|
||||
int main()
|
||||
{
|
||||
cin >> a >> b >> p;
|
||||
__int128 ans = (a % p) * (b % p) % p;
|
||||
__int128 ans = ((__int128)a % p) * (b % p) % p;
|
||||
put(ans);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user