Submission #928718
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), Math.ceil(a / ai)) t = ti * times a = ai * times } println((t + a).toLong) } }
Submission Info
Submission Time | |
---|---|
Task | C - AtCoDeer and Election Report |
User | iTakeshi |
Language | Scala (2.11.7) |
Score | 0 |
Code Size | 388 Byte |
Status | WA |
Exec Time | 504 ms |
Memory | 23108 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 | AC | 431 ms | 21844 KB |
0_001.txt | AC | 427 ms | 21280 KB |
0_002.txt | AC | 425 ms | 21700 KB |
1_003.txt | AC | 428 ms | 21812 KB |
1_004.txt | AC | 488 ms | 22712 KB |
1_005.txt | WA | 438 ms | 21804 KB |
1_006.txt | AC | 446 ms | 21560 KB |
1_007.txt | AC | 442 ms | 21436 KB |
1_008.txt | AC | 426 ms | 21692 KB |
1_009.txt | WA | 426 ms | 21172 KB |
1_010.txt | WA | 424 ms | 21548 KB |
1_011.txt | AC | 427 ms | 21688 KB |
1_012.txt | WA | 434 ms | 21960 KB |
1_013.txt | WA | 487 ms | 22712 KB |
1_014.txt | AC | 504 ms | 23108 KB |