3 条题解
-
1
#include<bits/stdc++.h> using namespace std; int x,n,b,y; string a; int read()//快读 { int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9') { x=x*10+(ch-'0'); ch=getchar(); } return x*f; } void write(int x) {//快输 if(x<0){ putchar('-'); write(-x); return; } if(x>=10)write(x/10); putchar(x%10+'0'); } int main() { x=read(); cin>>a;//简单模拟 n=read(); while(n--){ cin>>a>>a; b=read(); y+=b; } write(y+max(0,y-x)); return 0; }
-
-1
#include<bits/stdc++.h> using namespace std; long long n,m,sum,b; string s,a,c; int x[10000010]; int main(){ cin>>n>>s>>m; for(int i=1;i<=m;i++){ cin>>a>>c>>b;sum+=b;//sum统计每一个队员的工资 } if(sum>n){ sum+=(sum-n);//sum如果大于n则加上比n多的部分 } if(sum0){ cout<<"61133050";//sum0这个条件不写就只有90分 } else cout<<sum; }
- 1
信息
- ID
- 275
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 269
- 已通过
- 68
- 上传者