提出 #1263827


ソースコード 拡げる

#include <iostream>
#include <chrono>
#include <vector>
#include <string>
#include <algorithm>
#include <map>

using namespace std;

int main() {
	int a, b, c;
	int aa, bb, cc;
	cin >> a >> b >> c;
	int cnt;
	int max = 1000000;
	for (cnt = 0; cnt < max; cnt++) {
		if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) break;
		aa = a / 2;
		bb = b / 2;
		cc = c / 2;
		a = bb + cc;
		b = aa + cc;
		c = aa + bb;
	}
	if (cnt == max)
		cout << "-1" << endl;
	else
		cout << cnt << endl;
}

提出情報

提出日時
問題 A - Cookie Exchanges
ユーザ dsdsds
言語 C++14 (GCC 5.4.1)
得点 300
コード長 507 Byte
結果 AC
実行時間 5 ms
メモリ 256 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 300 / 300
結果
AC × 3
AC × 17
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
in1.txt AC 1 ms 256 KiB
in10.txt AC 1 ms 256 KiB
in11.txt AC 5 ms 256 KiB
in2.txt AC 1 ms 256 KiB
in3.txt AC 1 ms 256 KiB
in4.txt AC 1 ms 256 KiB
in5.txt AC 1 ms 256 KiB
in6.txt AC 1 ms 256 KiB
in7.txt AC 1 ms 256 KiB
in8.txt AC 1 ms 256 KiB
in9.txt AC 5 ms 256 KiB
sample1.txt AC 1 ms 256 KiB
sample2.txt AC 5 ms 256 KiB
sample3.txt AC 1 ms 256 KiB