国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

POJ 2586

2019-11-08 03:16:59
字體:
來源:轉載
供稿:網友
Y2K Accounting Bug
Time Limit: 1000MS Memory Limit: 65536K
Total Submissions: 14505 Accepted: 7296

Description

Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vital data for PReparing annual report for MS Inc. All what they remember is that MS Inc. posted a surplus or a deficit each month of 1999 and each month when MS Inc. posted surplus, the amount of surplus was s and each month when MS Inc. posted deficit, the deficit was d. They do not remember which or how many months posted surplus or deficit. MS Inc., unlike other companies, posts their earnings for each consecutive 5 months during a year. ACM knows that each of these 8 postings reported a deficit but they do not know how much. The chief accountant is almost sure that MS Inc. was about to post surplus for the entire year of 1999. Almost but not quite. Write a program, which decides whether MS Inc. suffered a deficit during 1999, or if a surplus for 1999 was possible, what is the maximum amount of surplus that they can post.

Input

Input is a sequence of lines, each containing two positive integers s and d.

Output

For each line of input, output one line containing either a single integer giving the amount of surplus for the entire year, or output Deficit if it is impossible.

Sample Input

59 237375 743200000 8496942500000 8000000

Sample Output

11628300612Deficit

Source

Waterloo local 2000.01.29
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 北碚区| 五寨县| 小金县| 泸水县| 哈尔滨市| 嘉黎县| 南安市| 延安市| 北碚区| 顺昌县| 富源县| 鹿泉市| 惠安县| 松江区| 凤凰县| 青铜峡市| 漳浦县| 南漳县| 柘城县| 清河县| 赣州市| 延津县| 霍山县| 皋兰县| 故城县| 韶关市| 木兰县| 阳西县| 东城区| 若羌县| 大安市| 嵊州市| 界首市| 高淳县| 高雄市| 大关县| 高碑店市| 义乌市| 霞浦县| 溆浦县| 凌云县|