import java.io.*; import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); while(sc.hasNext()){ String str = sc.nextLine(); str=str.substring(2); int res=0; for(int i = str.length()-1;i>=0;i--){ char c = str.charAt(i); if(c>='0' && c<='9'){ res *= 16; res += c-'0'; }else if(c>='A'&&c<='F'){ res *= 16; res += c-'A'+10; }else if(c>='a' && c<='f'){ res *= 16; res += c-'a'+10; }else{ System.out.println(res); } } System.out.println(res); } } }
点赞

相关推荐

完美的潜伏者许愿简历...:隐藏信息被你提取出来了,暗示,这就是暗示
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
昨天 11:45
你不要过来啊啊啊啊啊啊啊
码农索隆:对面:“今天你不面也得面”
点赞 评论 收藏
分享
Twilight_m...:经典我朋友XXXX起手,这是那种经典的不知道目前行情搁那儿胡编乱造瞎指导的中年人,不用理这种**
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务