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

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

1720 (錯誤)

2019-11-11 07:10:36
字體:
來源:轉載
供稿:網友


A+B Coming

Time Limit: 1000/1000 MS (java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 6819 Accepted Submission(s): 3122
 
PRoblem DescriptionMany classmates said to me that A+B is must needs.If you can’t AC this problem, you would invite me for night meal. ^_^ 
InputInput may contain multiple test cases. Each case contains A and B in one line.A, B are hexadecimal number.Input terminates by EOF. 
OutputOutput A+B in decimal number in one line. 
Sample Input
1 9A Ba b 
Sample Output
102121

import java.util.*;class Main{    public static void main(String args[]){        Scanner reader=new Scanner(System.in);        while(reader.hasNextInt()){        int a=reader.nextInt();        int b=reader.nextInt();        int sum=a+b;        System.out.println(sum);}        while(reader.hasNext()){        String c=reader.next();        String d=reader.next();             int e = Integer.parseInt(c, 16);        int f = Integer.parseInt(d, 16);        int sum=e+f;        System.out.println(sum);        }}}   

真不知道哪里錯了 心煩


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 桦南县| 泉州市| 克拉玛依市| 榆树市| 仁化县| 乌拉特前旗| 安陆市| 萨迦县| 武义县| 南乐县| 贵德县| 鹿泉市| 呼伦贝尔市| 古丈县| 盐津县| 西峡县| 平利县| 贡觉县| 佛山市| 侯马市| 宁河县| 绵阳市| 三明市| 楚雄市| 巴彦县| 无为县| 清丰县| 竹溪县| 凤凰县| 普陀区| 齐齐哈尔市| 合作市| 青川县| 衡南县| 广州市| 谢通门县| 布拖县| 高邮市| 吴川市| 清远市| 柳林县|