MnZn40pts求调,悬一关
查看原帖
MnZn40pts求调,悬一关
428889
Xile楼主2023/10/16 08:37
#include<bits/stdc++.h>
using namespace std;
const int N=10;
struct sd{
	int a,b;
}t[N];
int n,T,cnt;
int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n;
	for(int i=1;i<=n;i++) cin>>t[i].a>>t[i].b,cnt+=(100/t[i].a)*t[i].b;
	cin>>T;
	if(cnt>=T) puts("Already Au.");
	else{
		for(int i=1;i<=n;i++){
			if(cnt+(100/t[i].a)*(t[i].a-t[i].b)>=T) {
				int ans=0,tt=cnt;
				while(tt<T) tt+=(100/t[i].a),ans++;
				cout<<ans<<endl;
			}
			else puts("NaN");
		}
	}
	return 0;
}
2023/10/16 08:37
加载中...