Submission #1338683
Source Code Expand
import java.util.Scanner; public class Main2 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int d = Integer.parseInt(sc.nextLine()); String res; if(d < 0.1) res = "00"; else if(d<= 5 && d >=0.1) { int t = d * 10; if(t < 10) res = "0" + t; else res = String.valueOf(t); } else if(d >= 6 && d <=30) res = String.valueOf(d+50); else if(d >= 35 && d <= 70) { int t = (d - 30) / 5; t = t + 80; res = String.valueOf(t); } else if(d > 70) res = "89"; else return; System.out.println(res); } }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | fromT |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 833 Byte |
Status | CE |
Compile Error
./Main.java:4: error: class Main2 is public, should be declared in a file named Main2.java public class Main2 { ^ 1 error