Skip to content

Commit b91883d

Browse files
committed
done
1 parent 748ecb1 commit b91883d

File tree

2 files changed

+2
-34
lines changed

2 files changed

+2
-34
lines changed

CF1.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,6 @@ int main() {
2323
ll tc;
2424
cin >> tc;
2525
while (tc--) {
26-
ll n,k;
27-
cin>>n>>k;
28-
if(n<k){
29-
double ans=(double)k/n;
30-
cout<<ceil(ans)<<endl;
31-
}
32-
else if(n==k){
33-
cout<<1<<endl;
34-
}
35-
else{
36-
double ans=(double)n/k;
37-
ans=(ceil(ans)*k);
38-
ans/=n;
39-
cout<<ceil(ans)<<endl;
40-
}
26+
4127
}
4228
}

CF2.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,6 @@ int main() {
2323
ll tc;
2424
cin >> tc;
2525
while (tc--) {
26-
ll n,k;
27-
cin>>n>>k;
28-
ll sum;
29-
cin>>sum;
30-
ll change=0;
31-
for(ll i=1;i<n;i++){
32-
ll curr;
33-
cin>>curr;
34-
if(curr*100<=k*sum){}
35-
else{
36-
ll now=((curr*100)-(k*sum))/k;
37-
if(((curr*100)-(k*sum))%k!=0)
38-
now++;
39-
change+=now;
40-
sum+=now;
41-
}
42-
sum+=curr;
43-
}
44-
cout<<change<<endl;
26+
4527
}
4628
}

0 commit comments

Comments
 (0)