Submission #1262801
Source Code Expand
import java.util.*; public class Main { private static Scanner sc = new Scanner(System.in); public static void main(String[] args) { long a = sc.nextInt(); long b = sc.nextInt(); long c = sc.nextInt(); int ret = 0; for (int i = 0;i < 100000000;i++) { if (a%2!=0||b%2!=0||c%2!=0) { System.out.println(ret); return; } long ta = a/2; long tb = b/2; long tc = c/2; a = tb + tc; b = ta + tc; c = ta + tb; ret++; } System.out.println(-1); } }
Submission Info
Submission Time | |
---|---|
Task | A - Cookie Exchanges |
User | atkrym |
Language | Java8 (OpenJDK 1.8.0) |
Score | 300 |
Code Size | 515 Byte |
Status | AC |
Exec Time | 515 ms |
Memory | 23124 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 | 21332 KB |
in10.txt | AC | 91 ms | 19796 KB |
in11.txt | AC | 513 ms | 18768 KB |
in2.txt | AC | 92 ms | 19796 KB |
in3.txt | AC | 89 ms | 21588 KB |
in4.txt | AC | 91 ms | 21716 KB |
in5.txt | AC | 92 ms | 19412 KB |
in6.txt | AC | 91 ms | 19796 KB |
in7.txt | AC | 91 ms | 18644 KB |
in8.txt | AC | 91 ms | 21716 KB |
in9.txt | AC | 514 ms | 20692 KB |
sample1.txt | AC | 90 ms | 19796 KB |
sample2.txt | AC | 515 ms | 23124 KB |
sample3.txt | AC | 92 ms | 17620 KB |