diff --git a/C++/Misc/Power_of_78.cpp b/C++/Misc/Power_of_78.cpp new file mode 100644 index 0000000..30528b3 --- /dev/null +++ b/C++/Misc/Power_of_78.cpp @@ -0,0 +1,17 @@ +/* Check whether a number is power of 78 or not. */ +#include +using namespace std; +int main() { + int n,a; + cin>>n; + while(n--){ + cin>>a; + if(ceil(log(a)/log(78)) == floor(log(a)/log(78))){ + cout<<1<