0分全wa求调(自己的机器上面是对的)
查看原帖
0分全wa求调(自己的机器上面是对的)
1224510
huyiheng楼主2024/8/16 14:29

rt,代码如下

#include<bits/stdc++.h>
#define int long long		//开long long 
using namespace std;
const int mod=19260817;
int a,b,ans;
inline int read() {			//快读,方便取模 
	char ch=getchar();
	int res=0;
	while(isdigit(ch)) res=(res*10+ch-'0')%mod,ch=getchar();
	return res;
}
int q_pow(int x,int y) {	//快速幂 
	int s=1;
	while(y) {
		if(y&1) s=s*x%mod;
		x=x*x%mod;
		y>>=1;
	}
	return s;
}
int inv(int x) { 
	return q_pow(x,mod-2);
}
signed main() {
	a=read();
	b=read();
	if(b==0) {
		puts("Angry!"); 
		return 0;
	}
	ans=a*inv(b)%mod;
	cout<<ans;
	return 0;
}

我下载了第一组数据,自测答案正确是数字,但交上去说第一个字是A,说输出是Angry

2024/8/16 14:29
加载中...