8 条题解

  • 0
    @ 2022-9-24 15:47:19

    #include<stdio.h>

    #include

    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;
    
    }
    

    }

    信息

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