Submission #3783484
Source Code Expand
object Main extends App { def rec(e:Int ,cnt:Int): Int = { if((e & 1) == 1) cnt else rec(e>>1, cnt+1) } val n = io.StdIn.readLine.toInt val a = io.StdIn.readLine.split(" ").map(e => rec(e.toInt, 0)) println(a.min) }
Submission Info
Submission Time | |
---|---|
Task | B - Shift only |
User | un_kk |
Language | Scala (2.11.7) |
Score | 200 |
Code Size | 247 Byte |
Status | AC |
Exec Time | 328 ms |
Memory | 27336 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 327 ms | 25296 KB |
2.txt | AC | 321 ms | 25128 KB |
3.txt | AC | 324 ms | 25300 KB |
4.txt | AC | 324 ms | 25404 KB |
5.txt | AC | 324 ms | 27336 KB |
6.txt | AC | 325 ms | 25408 KB |
7.txt | AC | 322 ms | 25276 KB |
sample1.txt | AC | 321 ms | 25292 KB |
sample2.txt | AC | 328 ms | 25400 KB |
sample3.txt | AC | 325 ms | 25408 KB |