Codeforces Round #256 (Div. 2), problem: (A) Rewards editorial: http://codeforces.com/blog/entry/13042
Codeforces Round #256 (Div. 2), problem: (A) Rewards solution: http://ideone.com/tgdj3v
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main() { double a=0, b=0, c, n; for(int i=0; i<3; i++) scanf("%lf", &c), a+=c; for(int i=0; i<3; i++) scanf("%lf", &c), b+=c; scanf("%lf", &n); a=ceil(a/5), b=ceil(b/10); if(n>=a+b) printf("YES"); else printf("NO"); return 0; }
No comments:
Post a Comment