File tree Expand file tree Collapse file tree 2 files changed +2
-34
lines changed
Expand file tree Collapse file tree 2 files changed +2
-34
lines changed Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments