见标题
其他测试点都过了,就是第三个测试点过不了,下载了一下数据,经验等级对了,但剩下的经验点怎么就差了3?!
是我漏掉了什么吗?有没有大佬能解答一下??
#include<cstdio>
#include<cmath>
int main(){
long long n,L=0,xp=0,mm;
double k,x=10.0;
scanf("%lld",&n);
for(long long i=0;i<n;i++){
scanf("%lf %lld",&k,&mm);
x-=k;
if(x<=0)continue;
xp+=mm;
if(x>10)x=10;
}
while(xp>=pow(2,L)){
xp-=pow(2,L);
L++;
}
printf("%lld %lld",L,xp);
return 0;
}