8 条题解

  • 1
    @ 2022-1-11 11:53:02
    #include <iostream>
    #include <math.h>
    using namespace std;
    int main()
    {
        int a,b;
        cin>>a>>b;
        int x=1;
        for(int i=1; i<=b; i++)
        {
            x *=a;
            x = x%1000;
        }
        if(x<10)
        {
            cout<<"00"<<x;
        }
        else if(x<100)
        {
            cout<<0<<x;
        }
        else
        {
            cout<<x;
        }
        return 0;
    }
    

    信息

    ID
    926
    时间
    1000ms
    内存
    128MiB
    难度
    5
    标签
    递交数
    502
    已通过
    199
    上传者