Submission #3783428


Source Code Expand

object Main extends App {

  val n = io.StdIn.readLine.toInt
  val a = io.StdIn.readLine.split(" ").map(_.toInt)

  val ans = {
    var va = a
    var cnt = 0;
    var b = true;
    while(b) {
      if(va.forall(e => (e & 1) == 0 && e != 0)){ cnt += 1; va = va.map(e => e >> 1) }
      else b = false
    }
    cnt
  }
  println(ans)
}

Submission Info

Submission Time
Task B - Shift only
User un_kk
Language Scala (2.11.7)
Score 200
Code Size 351 Byte
Status AC
Exec Time 350 ms
Memory 25532 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 13
Set Name Test Cases
Sample sample1.txt, sample2.txt, sample3.txt
All sample1.txt, sample2.txt, sample3.txt, 1.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, sample1.txt, sample2.txt, sample3.txt
Case Name Status Exec Time Memory
1.txt AC 323 ms 23604 KB
2.txt AC 325 ms 25292 KB
3.txt AC 343 ms 25520 KB
4.txt AC 336 ms 25408 KB
5.txt AC 341 ms 25288 KB
6.txt AC 350 ms 25528 KB
7.txt AC 327 ms 25532 KB
sample1.txt AC 323 ms 25276 KB
sample2.txt AC 324 ms 25260 KB
sample3.txt AC 329 ms 25412 KB