Submission #928319
Source Code Expand
import io.StdIn.readLine object Main { def main(args: Array[String]): Unit = { val n = readLine().toInt var t, a = 1.0 for (i <- 1 to n) { val Array(ti, ai) = readLine().split(' ').map(_.toDouble) val times = Math.max(Math.ceil(t / ti).toInt, Math.ceil(a / ai).toInt) t = ti * times a = ai * times println(t, a) } println((t + a).toInt) } }
Submission Info
Submission Time | |
---|---|
Task | C - AtCoDeer and Election Report |
User | iTakeshi |
Language | Scala (2.11.7) |
Score | 0 |
Code Size | 420 Byte |
Status | WA |
Exec Time | 616 ms |
Memory | 24500 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt, 1_009.txt, 1_010.txt, 1_011.txt, 1_012.txt, 1_013.txt, 1_014.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | WA | 423 ms | 21668 KB |
0_001.txt | WA | 421 ms | 21660 KB |
0_002.txt | WA | 421 ms | 21432 KB |
1_003.txt | WA | 415 ms | 21436 KB |
1_004.txt | WA | 616 ms | 23424 KB |
1_005.txt | WA | 448 ms | 22048 KB |
1_006.txt | WA | 470 ms | 22340 KB |
1_007.txt | WA | 449 ms | 21692 KB |
1_008.txt | WA | 427 ms | 21952 KB |
1_009.txt | WA | 423 ms | 21448 KB |
1_010.txt | WA | 415 ms | 21320 KB |
1_011.txt | WA | 430 ms | 21808 KB |
1_012.txt | WA | 434 ms | 22036 KB |
1_013.txt | WA | 553 ms | 23704 KB |
1_014.txt | WA | 578 ms | 24500 KB |