平方计算

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;
}
posted @ 2022-02-09 09:58  ethon-wang  阅读(31)  评论(0编辑  收藏  举报