平方计算
code
#include<iostream>
#include<cstdio>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int a,m,ans;
cin>>a>>m;
a%=m;
ans=a*a%m;
cout<<ans;
return 0;
}
#include<iostream>
#include<cstdio>
using namespace std;
int main() {
ios::sync_with_stdio(false);
int a,m,ans;
cin>>a>>m;
a%=m;
ans=a*a%m;
cout<<ans;
return 0;
}