Submission #335278
Source Code Expand
import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); int m = sc.nexInt(); double km; km = m / 1000.0; int VV; if(km < 0.1) VV = 0; else if(km <= 5) VV = (int)km * 10; else if(km <= 30) VV = (int)km + 50; else if(km >= 35 && km <= 70) VV = ((int)km - 30) / 5 + 80; else if(km > 70) VV = 89; System.out.println("%02d",VV); } }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | ne260126 |
Language | Java (OpenJDK 1.7.0) |
Score | 0 |
Code Size | 434 Byte |
Status | CE |
Compile Error
./Main.java:5: error: cannot find symbol int m = sc.nexInt(); ^ symbol: method nexInt() location: variable sc of type Scanner ./Main.java:16: error: no suitable method found for println(String,int) System.out.println("%02d",VV); ^ method PrintStream.println(Object) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(String) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(char[]) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(double) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(float) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(long) is not applicable (actual and formal argument lists differ in length) method PrintStream.println(int) is not applicable (actual and...