Submission #3566066
Source Code Expand
import scala.io.StdIn._ /** * ABC001B * https://beta.atcoder.jp/contests/abc001/tasks/abc001_2 */ object Main extends App { val in: Int = readInt() val ans: String = (1.0 * in / 1000) match { case n if (n < 0.1) => "00" case n if (n <= 5) => n * 10 match { case nn if (nn < 10) => "0" + nn.toInt.toString() case nn => nn.toInt.toString() } case n if (n <= 30) => (n + 50).toInt.toString() case n if (n <= 70) => ((n - 30) / 5 + 80).toInt.toString() case _ => "89" } println(ans) }
Submission Info
Submission Time | |
---|---|
Task | B - 視程の通報 |
User | moinyan |
Language | Scala (2.11.7) |
Score | 100 |
Code Size | 583 Byte |
Status | AC |
Exec Time | 320 ms |
Memory | 27300 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 | 313 ms | 25280 KB |
00_sample_02.txt | AC | 311 ms | 23368 KB |
00_sample_03.txt | AC | 314 ms | 25152 KB |
test_01.txt | AC | 317 ms | 25160 KB |
test_02.txt | AC | 314 ms | 23352 KB |
test_03.txt | AC | 310 ms | 25156 KB |
test_04.txt | AC | 311 ms | 25156 KB |
test_05.txt | AC | 313 ms | 25288 KB |
test_06.txt | AC | 316 ms | 25276 KB |
test_07.txt | AC | 315 ms | 25288 KB |
test_08.txt | AC | 314 ms | 25140 KB |
test_09.txt | AC | 317 ms | 25400 KB |
test_10.txt | AC | 320 ms | 25428 KB |
test_11.txt | AC | 318 ms | 27300 KB |
test_12.txt | AC | 318 ms | 25284 KB |
test_13.txt | AC | 319 ms | 25260 KB |
test_14.txt | AC | 314 ms | 25392 KB |
test_15.txt | AC | 316 ms | 25412 KB |
test_16.txt | AC | 316 ms | 25152 KB |
test_17.txt | AC | 315 ms | 25280 KB |
test_18.txt | AC | 317 ms | 23480 KB |
test_19.txt | AC | 320 ms | 25260 KB |
test_20.txt | AC | 318 ms | 25272 KB |
test_21.txt | AC | 320 ms | 23184 KB |
test_22.txt | AC | 315 ms | 25288 KB |
test_23.txt | AC | 316 ms | 25396 KB |
test_24.txt | AC | 313 ms | 25144 KB |
test_25.txt | AC | 311 ms | 25244 KB |
test_26.txt | AC | 311 ms | 25168 KB |
test_27.txt | AC | 315 ms | 25276 KB |
test_28.txt | AC | 316 ms | 27204 KB |
test_29.txt | AC | 315 ms | 25372 KB |
test_30.txt | AC | 312 ms | 25044 KB |
test_31.txt | AC | 314 ms | 25248 KB |
test_32.txt | AC | 314 ms | 25292 KB |
test_33.txt | AC | 315 ms | 25300 KB |
test_34.txt | AC | 316 ms | 25540 KB |
test_35.txt | AC | 314 ms | 25024 KB |