Submission #2859669
Source Code Expand
#include <iostream> #include <fstream> #include <algorithm> #include <string> #include <vector> #include <cmath> #include <boost/multiprecision/cpp_int.hpp> using namespace std; using namespace boost::multiprecison; cpp_int power(int p, int q){ cpp_int ret = p; for(int i=1;i<q;i++){ ret *= p; } return ret; } int main(void){ int n = 0; cin >> n; cpp_int pow = 1; for(int i=1;i<=n;i++){ pow *= i; } cout << pow % (7 + power(10,9)) << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Training Camp |
User | reishoku |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 538 Byte |
Status | CE |
Compile Error
./Main.cpp:11:24: error: ‘multiprecison’ is not a namespace-name using namespace boost::multiprecison; ^ ./Main.cpp:11:37: error: expected namespace-name before ‘;’ token using namespace boost::multiprecison; ^ ./Main.cpp:13:1: error: ‘cpp_int’ does not name a type cpp_int power(int p, int q){ ^ ./Main.cpp: In function ‘int main()’: ./Main.cpp:24:5: error: ‘cpp_int’ was not declared in this scope cpp_int pow = 1; ^ ./Main.cpp:24:5: note: suggested alternatives: In file included from ./Main.cpp:8:0: /opt/boost/gcc/include/boost/multiprecision/cpp_int.hpp:1884:54: note: ‘boost::multiprecision::cpp_int’ typedef number<cpp_int_backend<> > cpp_int; ^ /opt/boost/gcc/include/boost/multiprecision/cpp_int.hpp:1884:54: note: ‘boost::multiprecision::cpp_int’ ./Main.cpp:26:13: error: overloaded function with no contextual type information pow *= i; ...