From 56b1fdd6c44bd990cbe543f34ea8bc9264f0e816 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 14 Nov 2024 18:05:15 +0800 Subject: [PATCH] update --- src/P3811/P3811.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/P3811/P3811.cpp diff --git a/src/P3811/P3811.cpp b/src/P3811/P3811.cpp new file mode 100644 index 0000000..2520101 --- /dev/null +++ b/src/P3811/P3811.cpp @@ -0,0 +1,23 @@ +#include +#include + +int main(){ + using ll = int64_t; + ll n,p; + std::cin>>n>>p; + auto pow = [](ll b, ll e, ll m)->ll{ + b%=m; + ll res{1}; + while(e!=0){ + if(e&1){ + res=(res*b)%m; + } + e>>=1; + b=(b*b)%m; + } + return res; + }; + for(ll i{1};i<=n;i++){ + std::cout<