Saleh127

CF1288B

Jul 2nd, 2020
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. test
  10. {
  11. ll a,c,d,e,f,i,j,k,l;
  12. cin>>a>>c;
  13. d=0;
  14. e=9;
  15. while(c>=e)
  16. {
  17. d+=a;
  18. e=9+e*10;
  19. }
  20. cout<<d<<endl;
  21. }
  22.  
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment