From a4aefd004ec6fe2f69c1a2cb815c7ed9459003b1 Mon Sep 17 00:00:00 2001 From: hanyixuanten <105723997+hanyixuanten@users.noreply.github.com> Date: Fri, 14 Aug 2026 19:37:30 +0800 Subject: [PATCH] new file: P10446.cpp --- P10446.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 P10446.cpp diff --git a/P10446.cpp b/P10446.cpp new file mode 100644 index 0000000..82518bc --- /dev/null +++ b/P10446.cpp @@ -0,0 +1,28 @@ +// 90 +#include +using namespace std; +long long a, b, p; +void put(__int128 a) +{ + char c[60]; + 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 = ((__int128)a % p) * (b % p) % p; + put(ans); + return 0; +} \ No newline at end of file