Submission #1262321
Source Code Expand
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AGC014 { public class A { private void Run() { var input = Console.ReadLine().Trim().Split(); var A = long.Parse(input[0]); var B = long.Parse(input[1]); var C = long.Parse(input[2]); long result = 0; while (A % 2 == 0 && B % 2 == 0 && C % 2 == 0) { var a = B / 2 + C / 2; var b = C / 2 + A / 2; var c = A / 2 + B / 2; A = a; B = b; C = c; result++; if (result > 100000) { result = -1; break; } } Console.WriteLine(result); } public static void Main() { var old = Console.Out; using (var writer = new System.IO.StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false }) { Console.SetOut(writer); new A().Run(); Console.Out.Flush(); Console.SetOut(old); } } } }
Submission Info
Submission Time | |
---|---|
Task | A - Cookie Exchanges |
User | Tan90909090 |
Language | C# (Mono 4.6.2.0) |
Score | 300 |
Code Size | 1297 Byte |
Status | AC |
Exec Time | 26 ms |
Memory | 11092 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 | 21 ms | 11092 KB |
in10.txt | AC | 20 ms | 9044 KB |
in11.txt | AC | 26 ms | 9044 KB |
in2.txt | AC | 20 ms | 11092 KB |
in3.txt | AC | 20 ms | 9044 KB |
in4.txt | AC | 21 ms | 11092 KB |
in5.txt | AC | 20 ms | 9044 KB |
in6.txt | AC | 20 ms | 9044 KB |
in7.txt | AC | 20 ms | 9044 KB |
in8.txt | AC | 21 ms | 11092 KB |
in9.txt | AC | 26 ms | 9044 KB |
sample1.txt | AC | 20 ms | 9044 KB |
sample2.txt | AC | 26 ms | 9044 KB |
sample3.txt | AC | 21 ms | 11092 KB |