D_M_ @ 2021-10-05 11:09:44
#include <bits/stdc++.h>
using namespace std;
int weishu[10]={1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000};
int n,q,a[1010],b[1010],d;
int main(){
cin >> n >> q;
for(int i=1;i<n;i++){
cin >> a[i];
}
sort(a,a+n);
for(int i=1;i<q;i++){
cin >> b[i];
if(a[i]%weishu[i] == b[i]){
cout << a[i]%weishu[i];
}else{
cout << -1;
}
}
return 0;
}
by fwx123456 @ 2021-10-05 11:34:33
突然发现你输入都是错的
by fwx123456 @ 2021-10-05 11:35:00
好吧你该过来了
by fwx123456 @ 2021-10-05 11:36:36
其实吧,你可以边输入边做,b[i],c[i]也就不需要
by D_M_ @ 2021-10-05 11:37:05
@fwx123456 a ?怎么写
by fwx123456 @ 2021-10-05 11:40:23
等会哈
by D_M_ @ 2021-10-05 11:48:33
@fwx123456 不用了,谢谢大佬,我的教练给我改了改。关注你了
by fwx123456 @ 2021-10-05 11:58:25
我改好了
by fwx123456 @ 2021-10-05 12:00:43
发你邮件