Advertisement
STANAANDREY

ncif

Dec 29th, 2019
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include <fstream>
  2. #include <cmath>
  3. using namespace std;
  4. ifstream fin("ncif.in");
  5. ofstream fout("ncif.out");
  6. int main()
  7. {
  8.     int n,m,k;
  9.     fin>>k;
  10.     for(int i=1; i<=k; ++i)
  11.     {
  12.         fin>>n>>m;
  13.         fout<<(int)((log10(n)*m)+1)<<endl;
  14.     }
  15.     return 0;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement