关于CE
查看原帖
关于CE
681349
ShouZheng_Observer楼主2022/5/27 21:49

这是什么错误?

[Error] invalid operands of types '__gnu_cxx::__promote_2<int, int, double, double>::__type {aka double}' and 'int' to binary 'operator%'

#include<bits/stdc++.h>
using namespace std;
int a,b,n;
int k;
int main(){
	cin>>a>>b>>n;
	int K=pow(10,n-1);
	k=(a/b*pow(10,n))%K;
	cout<<k;
	return 0;
}

2022/5/27 21:49
加载中...