• <input id="auww4"></input>
  • <input id="auww4"><acronym id="auww4"></acronym></input>
  • <input id="auww4"><u id="auww4"></u></input>
    <object id="auww4"><acronym id="auww4"></acronym></object>
    <menu id="auww4"></menu><input id="auww4"><u id="auww4"></u></input>
    <input id="auww4"><u id="auww4"></u></input>
  • F.A.Q
    Hand In Hand
    Online Acmers
    Forum | Discuss
    Statistical Charts
    Problem Archive
    Realtime Judge Status
    Authors Ranklist
     
         C/C++/Java Exams     
    ACM Steps
    Go to Job
    Contest LiveCast
    ICPC@China
    Best Coder beta
    VIP | STD Contests
    Virtual Contests
        DIY | Web-DIY beta
    Recent Contests
    Author ID 
    Password 
     Register new ID

    Java簡潔代碼,無視數字大小

    Posted by 曉若姬 at 2020-12-14 20:05:06 on Problem 2057
    (7)  


    import java.util.Scanner;
    import java.math.BigInteger;
    public class Main {
    
    	public static void main(String[] args) {
    		// TODO 自動生成的方法存根
    		Scanner in=new Scanner(System.in);
    		while(in.hasNext())
    		{
    			String A=in.next();
    			String B=in.next();
    			System.out.println(new BigInteger(A,16).add(new BigInteger(B,16)).toString(16).toUpperCase());
    		}
    		in.close();
    	}
    		
    	
    }

    Followed by:


    Post your reply here:

    Author ID
    Password
    Title
    Content  
     
    Hangzhou Dianzi University Online Judge 3.0
    Copyright © 2005-2021 HDU ACM Team. All Rights Reserved.
    Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
    Total 0.015600(s) query 5, Server time : 2021-01-21 10:09:43, Gzip enabled
    棋牌