Submission #410203
Source Code Expand
import java.util.Arrays; import java.util.Scanner; public class Main { MyScanner sc = new MyScanner(); Scanner sc2 = new Scanner(System.in); long start = System.currentTimeMillis(); long fin = System.currentTimeMillis(); final int MOD = 1000000000; int[] dx = { 1, 0, 0, -1 }; int[] dy = { 0, 1, -1, 0 }; void run() { double m = sc.nextDouble(); m /= 1000; if (m < 0.1) { System.out.println("00"); } else if (m <= 5) { if (m * 10 <= 9) { System.out.print(0); } System.out.println((int) (m * 10)); } else if (m <= 30) { System.out.println((int) (m + 50)); } else if (m <= 70) { System.out.println((int) ((m - 30) / 5 + 80)); } else { System.out.println(89); } } public static void main(String[] args) { new Main().run(); } void debug(Object... o) { System.out.println(Arrays.deepToString(o)); } void debug2(char[][] array) { for (int i = 0; i < array.length; i++) { for (int j = 0; j < array[i].length; j++) { System.out.print(array[i][j]); } System.out.println(); } } boolean inner(int h, int w, int limH, int limW) { return 0 <= h && h < limH && 0 <= w && w < limW; } void swap(int[] x, int a, int b) { int tmp = x[a]; x[a] = x[b]; x[b] = tmp; } // find minimum i (a[i] >= border) int lower_bound(int a[], int border) { int l = -1; int r = a.length; while (r - l > 1) { int mid = (l + r) / 2; if (border <= a[mid]) { r = mid; } else { l = mid; } } // r = l + 1 return r; } boolean palindrome(String s) { for (int i = 0; i < s.length() / 2; i++) { if (s.charAt(i) != s.charAt(s.length() - 1 - i)) { return false; } } return true; } class MyScanner { int nextInt() { try { int c = System.in.read(); while (c != '-' && (c < '0' || '9' < c)) c = System.in.read(); if (c == '-') return -nextInt(); int res = 0; do { res *= 10; res += c - '0'; c = System.in.read(); } while ('0' <= c && c <= '9'); return res; } catch (Exception e) { return -1; } } double nextDouble() { return Double.parseDouble(next()); } long nextLong() { return Long.parseLong(next()); } String next() { try { StringBuilder res = new StringBuilder(""); int c = System.in.read(); while (Character.isWhitespace(c)) c = System.in.read(); do { res.append((char) c); } while (!Character.isWhitespace(c = System.in.read())); return res.toString(); } catch (Exception e) { return null; } } int[] nextIntArray(int n) { int[] in = new int[n]; for (int i = 0; i < n; i++) { in[i] = nextInt(); } return in; } int[][] nextInt2dArray(int n, int m) { int[][] in = new int[n][m]; for (int i = 0; i < n; i++) { in[i] = nextIntArray(m); } return in; } double[] nextDoubleArray(int n) { double[] in = new double[n]; for (int i = 0; i < n; i++) { in[i] = nextDouble(); } return in; } long[] nextLongArray(int n) { long[] in = new long[n]; for (int i = 0; i < n; i++) { in[i] = nextLong(); } return in; } char[][] nextCharField(int n, int m) { char[][] in = new char[n][m]; for (int i = 0; i < n; i++) { String s = sc.next(); for (int j = 0; j < m; j++) { in[i][j] = s.charAt(j); } } return in; } } }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | suigingin |
Language | Java (OpenJDK 1.7.0) |
Score | 100 |
Code Size | 3525 Byte |
Status | AC |
Exec Time | 427 ms |
Memory | 23404 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt, test_18.txt, test_19.txt, test_20.txt, test_21.txt, test_22.txt, test_23.txt, test_24.txt, test_25.txt, test_26.txt, test_27.txt, test_28.txt, test_29.txt, test_30.txt, test_31.txt, test_32.txt, test_33.txt, test_34.txt, test_35.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 402 ms | 23276 KB |
00_sample_02.txt | AC | 400 ms | 23232 KB |
00_sample_03.txt | AC | 402 ms | 23256 KB |
test_01.txt | AC | 404 ms | 23204 KB |
test_02.txt | AC | 392 ms | 23280 KB |
test_03.txt | AC | 396 ms | 23236 KB |
test_04.txt | AC | 400 ms | 23296 KB |
test_05.txt | AC | 400 ms | 23248 KB |
test_06.txt | AC | 399 ms | 23204 KB |
test_07.txt | AC | 400 ms | 23176 KB |
test_08.txt | AC | 399 ms | 23260 KB |
test_09.txt | AC | 397 ms | 23240 KB |
test_10.txt | AC | 404 ms | 23248 KB |
test_11.txt | AC | 411 ms | 23332 KB |
test_12.txt | AC | 419 ms | 23276 KB |
test_13.txt | AC | 412 ms | 23260 KB |
test_14.txt | AC | 408 ms | 23348 KB |
test_15.txt | AC | 410 ms | 23396 KB |
test_16.txt | AC | 409 ms | 23236 KB |
test_17.txt | AC | 412 ms | 23284 KB |
test_18.txt | AC | 411 ms | 23240 KB |
test_19.txt | AC | 413 ms | 23344 KB |
test_20.txt | AC | 405 ms | 23276 KB |
test_21.txt | AC | 408 ms | 23284 KB |
test_22.txt | AC | 427 ms | 23236 KB |
test_23.txt | AC | 398 ms | 23300 KB |
test_24.txt | AC | 390 ms | 23292 KB |
test_25.txt | AC | 408 ms | 23368 KB |
test_26.txt | AC | 393 ms | 23244 KB |
test_27.txt | AC | 395 ms | 23404 KB |
test_28.txt | AC | 396 ms | 23320 KB |
test_29.txt | AC | 396 ms | 23284 KB |
test_30.txt | AC | 394 ms | 23296 KB |
test_31.txt | AC | 393 ms | 23256 KB |
test_32.txt | AC | 399 ms | 23260 KB |
test_33.txt | AC | 422 ms | 23208 KB |
test_34.txt | AC | 404 ms | 23304 KB |
test_35.txt | AC | 407 ms | 23308 KB |