new file: 3.cpp

This commit is contained in:
2026-08-14 09:07:03 +08:00
parent d47232e792
commit 0d9b6ebb4f
+28
View File
@@ -0,0 +1,28 @@
// 90
#include <iostream>
using namespace std;
long long a, b, p;
void put(__int128 a)
{
char c[40];
if (a == 0)
puts("0");
int tot = 0;
while (a > 0)
{
c[tot++] = a % 10 + '0';
a /= 10;
}
for (int i = tot - 1; i >= 0; --i)
{
putchar(c[i]);
}
puts("");
}
int main()
{
cin >> a >> b >> p;
__int128 ans = (a % p) * (b % p) % p;
put(ans);
return 0;
}