小编Dhr*_*eth的帖子

Java代码编译问题

  1. 请检查错误
  2. 我已经显示发生了运行时错误
  3. 请告诉我这里出了什么问题.
  4. 这就是问题[黑客等级挑战 - 洗板]:https://www.hackerrank.com/contests/101hack41/challenges/washing-plates

  5. 错误:

     Exception in thread "main" java.util.NoSuchElementException
        at java.util.Scanner.throwFor(Scanner.java:862)
        at java.util.Scanner.next(Scanner.java:1485)
        at java.util.Scanner.nextInt(Scanner.java:2117)
        at java.util.Scanner.nextInt(Scanner.java:2076)
        at Plates.main(Plates.java:17)
    
    Run Code Online (Sandbox Code Playgroud)
  6. 码.

    import java.util.*;
    
    public class Plates {
    
        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            //System.out.println("Enter Details");
            String s = in.next();
            int l = s.length();
            int n = s.charAt(0);
            int k = s.charAt(l - 1);
            int arr[][] = new int[n][2];
            for(int i = 0; i < n; i++) {
                for(int j = …
    Run Code Online (Sandbox Code Playgroud)

java

-30
推荐指数
1
解决办法
775
查看次数

标签 统计

java ×1