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

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

1720 (錯誤)

2019-11-11 06:41:40
字體:
來源:轉載
供稿:網友


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);        }}}   

真不知道哪里錯了 心煩


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 江津市| 大余县| 体育| 丽江市| 綦江县| 辽中县| 凉城县| 辉南县| 达孜县| 阿图什市| 厦门市| 论坛| 枞阳县| 金昌市| 天峨县| 阜南县| 怀宁县| 玛纳斯县| 宁明县| 德州市| 姜堰市| 金塔县| 胶南市| 同心县| 安福县| 翁源县| 镇安县| 高阳县| 新干县| 开封县| 盐源县| 长宁县| 东乌| 敖汉旗| 离岛区| 玉林市| 镇赉县| 永川市| 武强县| 黄浦区| 泗洪县|