Disclaimer: Make sure you tried enough before checking the solution
Problem: https://codeforces.com/group/MWSDmqGsZm/contest/223338/problem/P
#include <bits/stdc++.h> using namespace std; int main() { double num,result; cin>>num; for(int i = 2;i<=num;i++){ result+= log10(i); } cout<<"Number of digits of "<<num<<"! is "<<(int)result+1<<endl; }
Assiut University Training – Newcomers Solution Math – Geometry