Submission #10758647
Source Code Expand
#include<bits/stdc++.h> long long unsigned int qkmd(long long int x,long long int n long long int m) { // n //x mod m if(n==1)return x; return (qkmd(x,n/2,m)%m+qkmd(x,n-n/2,m)%m)%m; } int main() { long long unsigned int n,m,p,d; std::cin>>a>>b>>c; d=qkmd(n,p,m); std::cout<<d; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - n^p mod m |
User | luogu_bot1 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 353 Byte |
Status | CE |
Compile Error
./Main.cpp:3:29: error: expected ‘,’ or ‘...’ before ‘long’ long long int m) ^ ./Main.cpp: In function ‘long long unsigned int qkmd(long long int, long long int)’: ./Main.cpp:8:24: error: ‘m’ was not declared in this scope return (qkmd(x,n/2,m)%m+qkmd(x,n-n/2,m)%m)%m; ^ ./Main.cpp: In function ‘int main()’: ./Main.cpp:13:15: error: ‘a’ was not declared in this scope std::cin>>a>>b>>c; ^ ./Main.cpp:13:18: error: ‘b’ was not declared in this scope std::cin>>a>>b>>c; ^ ./Main.cpp:13:21: error: ‘c’ was not declared in this scope std::cin>>a>>b>>c; ^ ./Main.cpp:14:17: error: too many arguments to function ‘long long unsigned int qkmd(long long int, long long int)’ d=qkmd(n,p,m); ^ ./Main.cpp:2:24: note: declared here long long unsigned int qkmd(long long int x,long long int n ^