import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader; public class Main{
public static void main(String args[]) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String ISBN = reader.readLine();
String[] temp = ISBN.split("-");
String str = "";
int check = 0;
int x = 0;
String front = ISBN.substring(0, ISBN.length() - 1); for (int i = 0; i < temp.length; i++){
str += temp[i];
} for (int i = 0; i < str.length()-1; i++){
x = Integer.parseInt(String.valueOf(str.charAt(i)));
check += (i+1)*x;
} if (str.charAt(str.length()-1)=='X'){
if (check % 11 == 10) {
System.out.println("Right");
} else {
System.out.println(front + check % 11);
}
} else {
if (check%11 == Integer.parseInt(String.valueOf(str.charAt(str.length()-1)))){
System.out.println("Right");
} else {
if (check % 11 == 10) {
System.out.println(front + "X");
} else {
System.out.println(front + check % 11);
}
}
}
}
}

最新文章

  1. 理解ThreadLocal(之一)
  2. 史上最全最强SpringMVC详细示例实战教程
  3. 好用的php类库和方法
  4. GridView与CheckBox完美结合
  5. eclipse出现每次修改代码报heap over错误,然后必须重启tomcat问题,修改过程
  6. ActiveMQ(5.10.0) - Building a custom security plug-in
  7. module_init宏解析 linux驱动的入口函数module_init的加载和释放
  8. Javascript的AMD规范
  9. 在linux下实现UBOOT的TFTP下载功能
  10. bzoj3668
  11. oracle11g ora-12514监听程序当前无法识别
  12. IIS7.0 Appcmd 命令详解
  13. string函数详解(配案例)
  14. 线程相关的sleep()、yield()、wait()、join()方法介绍
  15. python入门(九):目录操作
  16. ASP.NET Core中使用Autofac
  17. linux中weblogic相关命令操作
  18. 4、JUC--CountDownLatch闭锁
  19. Zuul Timeouts
  20. 构造字典:DictionaryBase类和SortedList类

热门文章

  1. 马上要去bupt参加培训了。。
  2. xsser和XSStrike
  3. Nginx服务器的安装和卸载
  4. 实战!我用 Wireshark 让你“看得见“ TCP
  5. 【雕爷学编程】Arduino动手做(60)---WS2812直条8位模块
  6. git init 后关联github仓库是发生错误:
  7. django中ckeditor富文本编辑器使用
  8. 06.drf(django)的权限
  9. block和delegate的选择
  10. PAT-1018 Public Bike Management(dijkstra + dfs)