solution
stringlengths
11
983k
difficulty
int64
0
21
language
stringclasses
2 values
#include<bits/stdc++.h> using namespace std; const int N=105,mod=1e9+7; inline int add(int a,int b){return a+b>=mod?a+b-mod:a+b;} inline int mul(int a,int b){return 1ll*a*b%mod;} int n,m,l,r; int b[N],c[N],p[N]; int f[N*N],g[N*N]; map<int,int> ans; inline int solve(int x){ for(int i=0;i<=n*100;i++)g[i]=1; for(int i=1...
9
CPP
#include <iostream> #include <algorithm> constexpr int N = 105; constexpr int p = 1000000007; int add(int x, int y) { return (x += y) >= p ? x - p : x; } int sub(int x, int y) { return (x -= y) < 0 ? x + p : x; } int n, q, k; int c[N], b[N]; int f[N][N * N]; int s[2][N * N]; int l[N]; int main() { std::ios::syn...
9
CPP
#include<cmath> #include<cstdio> #include<vector> #include<algorithm> #include<map> using namespace std; int main() { int n, M=1000000007, tmp, maxc=100; vector<int> c; scanf("%d", &n); int sumc=0; for(int i=0;i<n;++i) { scanf("%d", &tmp); c.push_back(tmp); sumc+=tmp; }...
9
CPP
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long double ld; #ifdef DEBUG #define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #else #define eprintf(...) ; #endif #define sz(x) ((int) (x).size()) #define TASK "text" const int inf = (int) 1.01e9; con...
9
CPP
/** * @brief codeforces * @author yao */ #include <cstdlib> #include <cstdio> #include <cctype> #include <cstring> #include <utility> #include <algorithm> #include <functional> #include <climits> #define ft first #define sd second #ifdef DBG # define dbg_pri(x...) fprintf(stderr,x) #else # define dbg_pri(x......
9
CPP
#include <bits/stdc++.h> using namespace std; //using namespace atcoder; struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_; #define FOR(i, begin, end) for(int i=(begin);i<(end);i++) #define REP(i, n) FOR(i,0,n) #define IFOR(i, begin, end) for(int i=...
9
CPP
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; const int N = 105; const int MOD = (int)1e9 + 7; ...
9
CPP
/*~Rainybunny~*/ #include <cstdio> #include <cstring> #define rep( i, l, r ) for ( int i = l, rep##i = r; i <= rep##i; ++i ) #define per( i, r, l ) for ( int i = r, per##i = l; i >= per##i; --i ) const int MAXN = 101, MOD = 1e9 + 7; int n, c[MAXN + 5], b[MAXN + 5]; int sc[MAXN + 5], sb[MAXN + 5], sb2[MAXN + 5]; int...
9
CPP
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
9
CPP
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define x first #define y second typedef pair<int,int> pii; typedef long long ll; typedef unsigned long long ull; template <typename T> void chkmax(T &x,T y){x<y?x=y:T();} template <typename T> void chkmin(T &x,T y){y<x?x=y:T();} te...
9
CPP
// Bhagya Kamal Jain #include<bits/stdc++.h> #define ll long long #define pb push_back #define endl '\n' #define mii map<ll int,ll int> #define pii pair<ll int,ll int> #define vi vector<ll int> #define all(a) (a).begin(),(a).end() #define F first #defin...
9
CPP
#include <unordered_map> #include <algorithm> #include <iostream> #include <cstdlib> #include <fstream> #include <random> #include <iomanip> #include <clocale> #include <bitset> #include <string> #include <vector> #include <cmath> #include <ctime> #include <stack> #include <queue> #include <deque> #include <set> #inclu...
9
CPP
#include<bits/stdc++.h> namespace my_std{ using namespace std; #define pii pair<int,int> #define fir first #define sec second #define MP make_pair #define rep(i,x,y) for (int i=(x);i<=(y);i++) #define drep(i,x,y) for (int i=(x);i>=(y);i--) #define go(x) for (int i=head[x];i;i=edge[i].nxt) #define templ templat...
9
CPP
#include <bits/stdc++.h> // #pragma GCC optimize("trapv") #define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0); #define F first #define S second #define V vector #define PB push_back #define MP make_pair #define EB emplace_back #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; ty...
9
CPP
#include <bits/stdc++.h> using namespace std; #define ll long long #define int ll #define ld long double #define pii pair<int, int> #define f first #define s second #define boost() cin.tie(0), cin.sync_with_stdio(0) const int MN = 105, MOD = 1e9 + 7; int n, a[MN], b[MN], c[MN], psa[MN], psum[MN], q, x, dp[12000005], ...
9
CPP
/*{{{*/ #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<limits.h> #include<assert.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).be...
9
CPP
/* Author: QAQAutoMaton Lang: C++ Code: C1.cpp Mail: lk@qaq-am.com Blog: https://www.qaq-am.com/ */ #include<bits/stdc++.h> #define debug(qaq...) fprintf(stderr,qaq) #define DEBUG printf("Passing [%s] in LINE %d\n",__FUNCTION__,__LINE__) #define Debug debug("Passing [%s] in LINE %d\n",__FUNCTION__,__LINE__) #define all...
9
CPP
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int mod=1e9+7; inline int addmod(int x) { return x>=mod?x-mod:x; } inline int submod(int x) { return x<0?x+mod:x; } int n,m,q,b[105],c[105],sum[105],f[105][10005],qans[1005],pn; int solve(int x) { memset(f,0,sizeof(f)); f[0][0]=1; i...
9
CPP
#include <stdio.h> #include <iostream> #include <string> #include <string.h> #include <vector> #include <cmath> #include <assert.h> #include <algorithm> #include <queue> #include <climits> #include <set> #include <unordered_map> #include <time.h> #include <map> #include <stack> #include <unordered_set> #include <bitset...
9
CPP
#include <bits/stdc++.h> using namespace std; static struct FastInput { static constexpr int BUF_SIZE = 1 << 20; char buf[BUF_SIZE]; size_t chars_read = 0; size_t buf_pos = 0; FILE *in = stdin; char cur = 0; inline char get_char() { if (buf_pos >= chars_read) { chars_read = fread(buf, 1, BUF...
9
CPP
#include <bits/stdc++.h> using namespace std; #define int long long constexpr int MAXN = 100; constexpr int MOD = 1000000007; constexpr int MAXTOLERANCE = 10000001; //10001; // really? TODO int c[MAXN], b[MAXN], magic[MAXN]; int dp1[MAXTOLERANCE], dp2[MAXTOLERANCE]; int coalesce[MAXTOLERANCE+1]; int* const coal=coalesc...
9
CPP
#include <bits/stdc++.h> using namespace std; int main() { double n, x, y, p, q, r; int a; cin >> n >> x >> y; p = y / 100; q = n * p; r = q - x; a = r; if (r > a) { cout << a + 1; } else if (a < 0) { cout << "0"; } else { cout << a; } }
7
CPP
num,wiz,per = map(int,input().split()) k = 0 while (k+wiz)/num*100 < per: k += 1 print(k)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { double n, x, y; cin >> n >> x >> y; if (y * n / 100 <= x) cout << 0; else cout << ceil(y * n / 100 - x); return 0; }
7
CPP
# https://codeforces.com/problemset/problem/168/A # 900 n, x, y = map(int, input().split()) y /= 100 c = 0 while True: if (x+c) / n >= y: break c += 1 print(c)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n, x, y; cin >> n >> x >> y; if ((ceil(y * n / 100.0) - x) < 0) cout << 0 << endl; else cout << ceil(y * n / 100.0) - x << endl; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ; int n, x, y, c = 0; cin >> n >> x >> y; double p = ceil((y * n) / 100.00); p = (int)p; c = p - x; if (c <= 0) c = 0; cout << c; cout << '\n'; ; return 0; }
7
CPP
import math n,x,y=map(int,input().split()) z=math.ceil((y/100)*n) if(x>=z): print(0) else: print(z-x)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int32_t main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); float n, x, y; cin >> n >> x >> y; int ans = ceil((y * n / 100) - x); cout << max(ans, 0); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; while (cin >> n >> x >> y) { int sum = n * y; if (sum % 100) sum += 100; sum /= 100; sum -= x; if (sum > 0) cout << sum << endl; else cout << 0 << endl; } return 0; }
7
CPP
z=input mod = 10**9 + 7 from collections import * from queue import * from sys import * from collections import * from math import * from heapq import * from itertools import * from bisect import * from collections import Counter as cc from math import factorial as f def lcd(xnum1,xnum2): return (xnum1*xnum2//gcd(x...
7
PYTHON3
#include <bits/stdc++.h> int main() { int n, x, y; scanf("%d", &n); scanf("%d", &x); scanf("%d", &y); int dy = 0; if ((y * n) % 100 == 0) dy = ((y * n) / 100); else dy = ((y * n) / 100) + 1; int ans = 0; if (dy - x <= 0) ans = 0; else ans = dy - x; printf("%d", ans); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int n, x, y; int main() { scanf("%d%d%d", &n, &x, &y); int req = (int)ceil((double)(n * y) / 100); if (req <= x) printf("%d\n", 0); else printf("%d\n", req - x); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main(void) { int citizens, wizards, percentage, result; scanf("%d %d %d", &citizens, &wizards, &percentage); result = ceil((percentage * citizens) / 100.0); result = max(result - wizards, 0); printf("%d\n", result); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; if ((ceil(n * (y / 100.0)) - x) <= 0) cout << 0 << endl; else cout << (ceil(n * (y / 100.0)) - x) << endl; }
7
CPP
import math n , x , y = map(int, input().split()) percentage = math.ceil(y*n/100) print(max(0, percentage-x))
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; cout << max(0, (n * y + 99) / 100 - x) << endl; return 0; }
7
CPP
""" n=int(z()) for _ in range(int(z())): x=int(z()) l=list(map(int,z().split())) n=int(z()) l=sorted(list(map(int,z().split())))[::-1] a,b=map(int,z().split()) l=set(map(int,z().split())) led=(6,2,5,5,4,5,6,3,7,6) vowel={'a':0,'e':0,'i':0,'o':0,'u':0} color4=["G", "GB", "YGB", "YGBI", "OYGBI" ,"OY...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; float p = x * 100 / n; int i = 0; while (p < y) { i++; x++; p = x * 100 / n; } cout << i << endl; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { double n, x; double y; cin >> n >> x >> y; if ((x * 100) / n >= y) { cout << 0; exit(0); } cout << ceil((y * n) / 100 - x); }
7
CPP
#include <bits/stdc++.h> using namespace std; class Solution {}; int main(int argc, char* argv[]) { ios_base::sync_with_stdio(false); int n, x, y; cin >> n >> x >> y; double p = (((double)(y * n)) / 100.0 - x); if (p < 0) p = 0; cout << ceil(p) << "\n"; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { double n, x, y; cin >> n >> x >> y; double t = x / n; int ans = 0; while (t + 1e-7 < y / 100) { ans++; t = (x + ans) / n; } cout << ans; return 0; }
7
CPP
import math n,x,y=map(int,input().split()) d=math.ceil((y/100)*n) if(int(d)>x): print(int(d)-x) elif(int(d)<=x): print(0)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; y = ceil((y * n) / 100.0); cout << max(y - x, 0) << endl; ; }
7
CPP
#include <bits/stdc++.h> int main() { int n, x, y, m; scanf("%d %d %d", &n, &x, &y); double s; s = (y / 100.0) * n; if (s == (int)s) m = (int)s; else m = (int)s + 1; if (m <= x) printf("0\n"); else printf("%d\n", m - x); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; const double eps = 1e-9; const int inf = 2000000000; const long long int infLL = 9000000000000000000; const int Mx = 1e3 + 123; long long int n, x, y, k; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ; cin >> n >> x >> y; k = (long long int...
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; scanf("%d%d%d", &n, &x, &y); printf("%d\n", max(0, (n * y / 100 + ((n * y % 100) ? 1 : 0)) - x)); }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int ans = ceil(n * y * 1.0 / 100); cout << max(ans - x, 0); }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { long long a, b, c; scanf("%lld %lld %lld", &a, &b, &c); for (long long i = 0;; i++) { long long val = b + i; long long t = (100 * val) / a; if (t >= c) { cout << i << endl; return 0; } } }
7
CPP
#include <bits/stdc++.h> int main(int argc, const char* argv[]) { int n, x, y; scanf("%d%d%d", &n, &x, &y); int min = ((n * y - 1) / 100 + 1); if (min < x) x = 0; else x = min - x; printf("%d\n", x); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { double a, x, y; cin >> a >> x >> y; double k = ceil(a / 100.0 * y); if (k - x >= 0) cout << k - x; else cout << 0; return 0; }
7
CPP
from math import ceil n,x,y = list(map(int, input().split(" "))) print(ceil(n*y/100)-x if ceil(n*y/100)-x>0 else 0)
7
PYTHON3
import math n,x,y = map(int, input().split()) print(max(math.ceil(n*y/100)-x,0))
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { double a, b, c, ans, x, cnt, need; while (cin >> a >> b >> c) { need = c / 100.0; cnt = ceil(a * need); ans = cnt - b; x = 0; cout << max(x, ans) << endl; } return 0; }
7
CPP
import math a,b,c=map(int,input().split()) print(math.ceil((a*c)/100-b) if math.ceil((a*c)/100-b)>0 else 0)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int ans = (n * y - 1) / 100 + 1 - x; if (ans > 0) cout << ans << endl; else cout << 0 << endl; }
7
CPP
from math import ceil n, x, y = map(int, input().split()) wizard_needed = ceil((n * y) / 100) print(max(0, wizard_needed - x))
7
PYTHON3
#include <bits/stdc++.h> using namespace std; long long arr[51]; int main() { double n, x, y; cin >> n >> x >> y; ceil(n * y / 100.0) < x ? cout << 0 : cout << ceil(n * y / 100.0) - x; }
7
CPP
#include <bits/stdc++.h> using namespace std; signed main() { double n, m, k; cin >> n >> m >> k; double wiz = (m / n) * 100; if (wiz >= k) cout << 0; else { double cur = ((k - wiz) / 100) * n; cur = ceil(cur); long long ans = cur; cout << ans; } }
7
CPP
#include <bits/stdc++.h> int main() { int n, x, y; while (~scanf("%d%d%d", &n, &x, &y)) { int num = ceil(n * (y * 1.0 / 100)); if (x >= num) printf("0\n"); else printf("%d\n", num - x); } return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; double N, W, Y; int main() { double need; int k = 0; cin >> N >> W >> Y; need = N * (Y / 100); if (need <= W) cout << 0; else { if (need != (int)need) k = 1; cout << (int)need - W + k; } return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { double P; int N, wizard; scanf("%d %d %lf", &N, &wizard, &P); int jawab = max(0, (int)(ceil(P / 100.0 * (double)N) + 0.005) - wizard); printf("%d\n", jawab); return 0; }
7
CPP
n, x, y = input().split(" ") n = int(n) x = int(x) y = int(y) nx = n - x pp = 0 while ((x + pp)/n) * 100 < y: pp += 1 print(pp)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { long long int n, x, y, need; cin >> n >> x >> y; need = y * n; if ((y * n) % 100 == 0) { need = (y * n) / 100; } else { need = (y * n) / 100; need++; } if (need > x) { cout << need - x << endl; } else { cout << "0" << endl; ...
7
CPP
import sys my_file = sys.stdin #my_file = open("input.txt", "r") line = [int(i) for i in my_file.readline().split()] n, x, y = line[0], line[1], line[2] res = 0 need = n*y/100 while x < need: x += 1 res += 1 print(res)
7
PYTHON3
#include <bits/stdc++.h> int n, x, y; double dpeople; int ipeople; int main() { scanf("%d %d %d", &n, &x, &y); dpeople = (double)n * y / 100; if (dpeople <= x) { printf("0\n"); return 0; } ipeople = dpeople; if (ipeople == dpeople) printf("%d\n", ipeople - x); else printf("%d\n", ipeople +...
7
CPP
import sys my_file = sys.stdin #my_file = open("input.txt", "r") line = [int(i) for i in my_file.readline().split()] n, x, y = line[0], line[1], line[2] res = 0 while x < n*y/100: x += 1 res += 1 print(res)
7
PYTHON3
import math x = input().split(" ") y = math.ceil(((int(x[2])*int(x[0]))/100)-int(x[1])) if y > 0: print(y) else: print(0)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, k, y; cin >> n >> k >> y; long double tmp = ceil(n * (y / 100.00)); if ((int)tmp - k <= 0) cout << 0; else cout << (int)tmp - k; }
7
CPP
#include <bits/stdc++.h> using namespace std; int n, x, y; int main() { while (cin >> n >> x >> y) { int nd = (n * y + 99) / 100; if (nd <= x) puts("0"); else cout << nd - x << endl; } }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int min; min = ceil(y * 0.01 * n); if (min > x) cout << (min - x); else cout << 0; }
7
CPP
import math n,x,y = map(int , input().split()) y = y/100 z = math.ceil(n*y) - x print(max(0,z))
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { double n, x, y; cin >> n >> x >> y; double res = y / ((float)100.0) * n; if (res <= x) cout << 0; else cout << ceil(res - x); return 0; }
7
CPP
from math import ceil n,x,y=map(int,input().split()) ans=max(0,ceil(y*n/100.0-x)) print(ans)
7
PYTHON3
a, b, c = map(int, input().split()) temp = a * (c / 100) if temp - int(temp) > 0.0: temp = int(temp + 1) else: temp = int(temp) print(max(0, temp - b))
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y >> z; double a = ceil(((double)z / 100.0) * (double)x); int t = a - y; if (t >= 0) { cout << t << "\n"; } else { cout << 0 << "\n"; } }
7
CPP
n,x,y=map(int,input().split()) if (n*y)/100>(n*y)//100: reqad=((n*y)//100)+1 else: reqad=((n*y)//100) ans=reqad-x if ans<0: print(0) else: print(ans)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int m = y * n; if (m % 100 > 0) m = (m / 100) + 1; else m = m / 100; int left = m - x; if (left < 0) cout << 0; else cout << left; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; if (y < 100) { float tmp = (float(y) / 100) * n; tmp = ceil(tmp); if (tmp > x) { cout << tmp - x; } else { cout << 0; } } else { float y2 = (float(y) / 100) * 1; float tmp = y2 * n...
7
CPP
import math n,x,y=map(int,input().split()) xx=max(0,math.ceil(n*y/100)-x) print(xx)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { double tota, wizard, percent; cin >> tota >> wizard >> percent; double amount = tota * (percent / 100.0); amount = ceil(amount); if (amount <= wizard) cout << 0 << endl; else { int ans = amount - wizard; cout << ans << endl; } return...
7
CPP
import math from bisect import bisect_left,bisect,bisect_right from itertools import accumulate def index(a, x): 'Locate the leftmost value exactly equal to x' i = bisect_left(a, x) if i != len(a) and a[i] == x: return i raise ValueError def find_lt(a, x): 'Find rightmost value less than x...
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int q = (y * n - ((y * n) % 100)) / 100; q += (y * n % 100) != 0; if (q <= x) { cout << "0"; } else cout << q - x; return 0; }
7
CPP
#include <bits/stdc++.h> int main() { int n, x, y, i, j, k = 0, p; scanf("%d%d%d", &n, &x, &y); i = y * n; j = i % 100; k = i / 100; if (j != 0) { k++; } p = k - x; if (p < 0) { printf("0\n"); } else { printf("%d\n", p); } return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int main() { ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n, x, y; double demo; cin >> n >> x >> y; demo = ceil(y * n / 100.0); if (x <= demo) cout << demo - x; else cout << 0; return 0; }
7
CPP
from math import * n, x, y = input().split() z = ceil((int(y)/100)*int(n)) if(z > int(x)): s = (z - int(x)) else : s = 0 print(s)
7
PYTHON3
l=input() l=l.split() n=int(l[0]) x=int(l[1]) y=int(l[2]) s=0 while (x/n)*100<y: s+=1 x+=1 print(s)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int run() { int i, p, j; int n, x, y; scanf("%d %d %d", &n, &x, &y); p = y * n / 100; if ((y * n) % 100 != 0) p++; if (p > x) printf("%d\n", p - x); else puts("0"); return 0; } int main() { run(); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int n, x, y; int main() { scanf("%d%d%d", &n, &x, &y); double px = x * 1.0 / n; double py = y * 1.0 / 100; int add = 0; while (px < py) { add++; px = (x + add) * 1.0 / n; } printf("%d\n", add); return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; void c_p_c() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } bool prime(long long c) { for (long long i = 2; i * i <= c; i++) { if (c % i == 0) return 0; } return 1; } vector<long long> sievePrime(long long *p, long long n) { p[0] = p[1] = 0; ...
7
CPP
import math if __name__ == '__main__': n, x, y = str(input()).split() n = int(n) x = int(x) y = int(y) print(max(0, int(math.ceil(n * y / 100)) - x))
7
PYTHON3
n,x,y=map(int,input().split()) if n*y%100==0 and int(n*y/100)<=x: print(0) elif n*y%100!=0 and int(n*y/100)+1<=x: print(0) else: if n*y%100==0: print(int(n*y/100)-x) else: print(int(n*y/100)+1-x)
7
PYTHON3
#include <bits/stdc++.h> using namespace std; int main() { int b, x; double a, c; cin >> a >> b >> c; x = ceil(a * (c / 100)); cout << max(0, x - b) << endl; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y, clone = 0; cin >> n >> x >> y; while (double((100 * (x + clone)) / n) < y) clone++; cout << clone; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { int n, x, y; cin >> n >> x >> y; int p = y * n - 100 * x; if (p <= 0) cout << 0 << endl; else if (p % 100) cout << p / 100 + 1 << endl; else cout << p / 100 << endl; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; double a, b, c, d; int total; int main() { cin >> a >> b >> c; d = a * c / 100; d = ceil(d); d -= b; if (d < 0) cout << 0; else cout << d; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main(int argc, char *argv[]) { int n, x, y; cin >> n >> x >> y; double d = (double(n) * double(y)) / 100.00; int k = ceil(d); if (x >= k) cout << 0; else cout << k - x; return EXIT_SUCCESS; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main() { double n, y, x; cin >> n >> x >> y; double k = n * y / 100; k = ceil(k); if (k > x) cout << k - x; else cout << 0; return 0; }
7
CPP
#include <bits/stdc++.h> using namespace std; int main(int argc, const char* argv[]) { int n, x, y; cin >> n >> x >> y; if (x * 100 >= y * n) { cout << 0; } else { cout << (y * n - x * 100 + 99) / 100; } return 0; }
7
CPP
# cook your dish here inpu = input().split() n = int(inpu[0]) x = int(inpu[1]) y = int(inpu[2]) req = y*n/100.0 if (req != int(req)): req = int(req) + 1 else: req = int(req) if (req <= x): print (0) else: print (req-x)
7
PYTHON3