国产探花免费观看_亚洲丰满少妇自慰呻吟_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
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 科技| 雷山县| 塔河县| 巴彦淖尔市| 星座| 长宁县| 乐安县| 静乐县| 万载县| 阿拉尔市| 阿荣旗| 万盛区| 方正县| 凉城县| 钦州市| 朔州市| 栾川县| 平阴县| 灵台县| 遵义市| 满洲里市| 定西市| 巴林右旗| 连州市| 深水埗区| 土默特右旗| 鄢陵县| 怀化市| 靖西县| 延安市| 江油市| 梧州市| 昭平县| 建阳市| 克山县| 北流市| 天峨县| 揭西县| 红河县| 双桥区| 赣州市|