Submission #105349


Source Code Expand

Copy
object Main extends App {
  override def main(args: Array[String]): Unit = {
    var N = readLine.toInt;
    var res = new Array[Int](6);
    for (i <- 1 to N) {
      var tmp = readLine.split(" ");
      var MT = tmp(0).toDouble;
      var mT = tmp(1).toDouble;

      if (MT >= 35) {
        res(0) += 1;
      } else if (MT >= 30) {
        res(1) += 1;
      } else if (MT >= 25) {
        res(2) += 1;
      }
      if (mT >= 25) {
        res(3) += 1;
      }
      if (MT >= 0 && mT < 0) {
        res(4) += 1
      } else if (MT < 0) {
        res(5) += 1
      }
    }
    println(res.mkString(" "));
  }
}

Submission Info

Submission Time
Task B - 真冬日?真夏日?
User yuki2006
Language Scala (2.9.1)
Score 100
Code Size 642 Byte
Status
Exec Time 1321 ms
Memory 49104 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_00.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
Case Name Status Exec Time Memory
00_sample_01.txt 958 ms 42284 KB
00_sample_02.txt 1055 ms 42280 KB
00_sample_03.txt 999 ms 42392 KB
test_00.txt 966 ms 42452 KB
test_01.txt 1108 ms 42500 KB
test_02.txt 994 ms 42448 KB
test_03.txt 957 ms 42376 KB
test_04.txt 963 ms 42392 KB
test_05.txt 970 ms 42392 KB
test_06.txt 1019 ms 42368 KB
test_07.txt 1082 ms 43924 KB
test_08.txt 1168 ms 48012 KB
test_09.txt 1321 ms 48460 KB
test_10.txt 1201 ms 48128 KB
test_11.txt 1140 ms 48648 KB
test_12.txt 1244 ms 49104 KB
test_13.txt 1119 ms 47920 KB