Educational Codeforces Round 80 (Rated for Div. 2)(BYet Another Meme Problem)

Posted vampire6

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Educational Codeforces Round 80 (Rated for Div. 2)(BYet Another Meme Problem)相关的知识,希望对你有一定的参考价值。

(B)Yet Another Meme Problem

 

题目

 

技术图片

 

 

思路:找b中9,99,999,999.。。。比b小的这些个数,然后相乘就行。。。

#include<bits/stdc++.h>
using namespace std;
int main()
{
    //freopen("text","r",stdin);
    int T;
    scanf("%d",&T);
    while(T--)
    {
        long long a,b;
        cin>>a>>b;
        if(b<9)
            printf("0
");
        else{
            if(b<99)
                cout<<a<<endl;
            else if(b<999)
                cout<<a*2<<endl;
            else if(b<9999)
                cout<<a*3<<endl;
            else if(b<99999)
                cout<<a*4<<endl;
            else if(b<999999)
                cout<<a*5<<endl;
            else if(b<9999999)
                cout<<a*6<<endl;
            else if(b<99999999)
                cout<<a*7<<endl;
            else if(b<999999999)
                cout<<a*8<<endl;
            else
                cout<<a*9<<endl;
        }
 
    }
    return 0;
}

以上是关于Educational Codeforces Round 80 (Rated for Div. 2)(BYet Another Meme Problem)的主要内容,如果未能解决你的问题,请参考以下文章

Educational Codeforces Round 7 A

Educational Codeforces Round 7

Educational Codeforces Round 90

Educational Codeforces Round 33

Codeforces Educational Codeforces Round 54 题解

Educational Codeforces Round 27