标签:des blog class code c color
Time Limit: 1000MS | Memory Limit: 65536K | |
Total Submissions: 9644 | Accepted: 4813 |
Description
Input
Output
Sample Input
59 237 375 743 200000 849694 2500000 8000000
Sample Output
116 28 300612 Deficit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37 |
/*====================================================================== * Author : kevin * Filename : Y2KAccountingBug.cpp * Creat time : 2014-05-15 10:33 * Description : ========================================================================*/ #include <iostream> #include <algorithm> #include <cstdio> #include <cstring> #include <queue> #include <cmath> #define clr(a,b) memset(a,b,sizeof(a)) #define M using
namespace std; int
dr[5]={2,4,6,9,12}; int
main( int
argc, char
*argv[]) { long
long n,m; while ( scanf ( "%lld%lld" ,&n,&m)!=EOF){ int
i; for (i = 1; i <= 5; i++){ long
long s = m*i - n*(5-i); if (s >= 0){ break ; } } long
long ss = n*(12 - dr[i-1]) - m*(dr[i-1]); if (ss < 0){ printf ( "Deficit\n" ); } else { printf ( "%lld\n" ,ss); } } return
0; } |
poj 2586 -- Y2K Accounting Bug,布布扣,bubuko.com
poj 2586 -- Y2K Accounting Bug
标签:des blog class code c color
原文地址:http://www.cnblogs.com/ubuntu-kevin/p/3729581.html