Submission #2235624
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { final Scanner sc = new Scanner(System.in); long a = sc.nextLong(); long b = sc.nextLong(); long c = sc.nextLong(); if(a%2==0&&b%2==0%2&&c%2==0) { int count = 1; for(int i = 0; i < 30; i++) { long na = b/2+c/2; long nb = a/2+c/2; long nc = a/2+b/2; a = na;b = nb;c = nc; if(a%2==0&&b%2==0&&c%2==0) { count++; } else { System.out.println(count); return; } } } else { System.out.println(0); return; } System.out.println(-1); } }
Submission Info
Submission Time | |
---|---|
Task | A - Cookie Exchanges |
User | naoppy |
Language | Java8 (OpenJDK 1.8.0) |
Score | 300 |
Code Size | 617 Byte |
Status | AC |
Exec Time | 108 ms |
Memory | 21588 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt |
All | sample1.txt, sample2.txt, sample3.txt, in1.txt, in10.txt, in11.txt, in2.txt, in3.txt, in4.txt, in5.txt, in6.txt, in7.txt, in8.txt, in9.txt, sample1.txt, sample2.txt, sample3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 93 ms | 21204 KB |
in10.txt | AC | 93 ms | 19796 KB |
in11.txt | AC | 95 ms | 19668 KB |
in2.txt | AC | 92 ms | 19924 KB |
in3.txt | AC | 93 ms | 21588 KB |
in4.txt | AC | 94 ms | 21332 KB |
in5.txt | AC | 96 ms | 20820 KB |
in6.txt | AC | 95 ms | 21204 KB |
in7.txt | AC | 94 ms | 17620 KB |
in8.txt | AC | 95 ms | 19796 KB |
in9.txt | AC | 108 ms | 18900 KB |
sample1.txt | AC | 92 ms | 21588 KB |
sample2.txt | AC | 93 ms | 21460 KB |
sample3.txt | AC | 92 ms | 19412 KB |