3134. 短信激活码

Cuibaby edited 4 年,8 月前

include

include

using namespace std;
int main()
{
int t;
cin>>t;
for(int i = 0; i < t; i++)
{
char a,b,c,d,e;
cin>>a>>b>>c>>d>>e;

    long long sum= (a-'0')*10000+(c-'0')*1000+(e-'0')*100+(d-'0')*10+b-'0';
    long long res=1;
    for(int j = 0; j < 5; j++)
    {
        res=res*sum%100000;
    }
    printf("case #%d:\n%05d\n",i,res);

}
return 0;

}

Comments