/ Vijos /

记录详情

Compile Error

/in/Main.java:2: error: class, interface, or enum expected
	public static void main(String[] args) {
	              ^
/in/Main.java:4: error: class, interface, or enum expected
		int fina = 0,clas = 0,n = 0,brk = 0;
		^
/in/Main.java:5: error: class, interface, or enum expected
		String read = "",name = "",stu = "";
		^
/in/Main.java:6: error: class, interface, or enum expected
		Scanner scan = new Scanner(System.in);
		^
/in/Main.java:7: error: class, interface, or enum expected
		read = scan.nextLine();
		^
/in/Main.java:8: error: class, interface, or enum expected
		n = (int)read.charAt(0)-'0';
		^
/in/Main.java:10: error: class, interface, or enum expected
		for(int i = 1;i <= n;++ i)
		^
/in/Main.java:10: error: class, interface, or enum expected
		for(int i = 1;i <= n;++ i)
		              ^
/in/Main.java:10: error: class, interface, or enum expected
		for(int i = 1;i <= n;++ i)
		                     ^
/in/Main.java:13: error: class, interface, or enum expected
		    for(int j = 0;j <= read.length();++ j)
		    ^
/in/Main.java:13: error: class, interface, or enum expected
		    for(int j = 0;j <= read.length();++ j)
		                  ^
/in/Main.java:13: error: class, interface, or enum expected
		    for(int j = 0;j <= read.length();++ j)
		                                     ^
/in/Main.java:17: error: class, interface, or enum expected
		            stu = read.substring(0,j-1);
		            ^
/in/Main.java:18: error: class, interface, or enum expected
		            fina = (int)(read.charAt(j)-'0');
		            ^
/in/Main.java:19: error: class, interface, or enum expected
		            if(read.charAt(j+1) >= '0' && read.charAt(j+1) <= '9')
		            ^
/in/Main.java:22: error: class, interface, or enum expected
		                brk ++;
		                ^
/in/Main.java:23: error: class, interface, or enum expected
		            }
		            ^
/in/Main.java:25: error: class, interface, or enum expected
		        }
		        ^
/in/Main.java:27: error: class, interface, or enum expected
            clas = (int)(read.charAt(brk)-'0');
            ^
/in/Main.java:28: error: class, interface, or enum expected
            if(read.charAt(brk+1) >= '0' && read.charAt(brk+1) <= '9')
            ^
/in/Main.java:31: error: class, interface, or enum expected
                brk ++;
                ^
/in/Main.java:32: error: class, interface, or enum expected
            }
            ^
/in/Main.java:35: error: class, interface, or enum expected
		    if(fina > 90) money += 2000;
		    ^
/in/Main.java:36: error: class, interface, or enum expected
		    if(fina > 85 && clas > 80) money += 4000;
		    ^
/in/Main.java:37: error: class, interface, or enum expected
		    if(read.charAt(brk+2) == 'Y' && clas > 80) money += 850;
		    ^
/in/Main.java:38: error: class, interface, or enum expected
		    if(read.charAt(brk+4) == 'Y' && fina > 85) money += 1000;
		    ^
/in/Main.java:39: error: class, interface, or enum expected
		    if(fina > 80 && read.charAt(brk+6)>'0' && read.charAt(brk+6)<='9') money += 8000;
		    ^
/in/Main.java:40: error: class, interface, or enum expected
		    if(money > max) {
		    ^
/in/Main.java:42: error: class, interface, or enum expected
		        name = stu;
		        ^
/in/Main.java:43: error: class, interface, or enum expected
	    	}
	    	^
/in/Main.java:45: error: class, interface, or enum expected
    	}
    	^
/in/Main.java:47: error: class, interface, or enum expected
        System.out.println(max);
        ^
/in/Main.java:48: error: class, interface, or enum expected
        System.out.println(sum);
        ^
/in/Main.java:49: error: class, interface, or enum expected
        scan.close();
        ^
/in/Main.java:50: error: class, interface, or enum expected
	}
	^
35 errors

信息

递交者
类型
递交
题目
P1001 谁拿了最多奖学金
语言
Java
递交时间
2019-10-17 20:12:22
评测时间
2019-10-17 20:12:22
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes