Submission #1996457


Source Code Expand

#include <algorithm>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <map>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <list>
#include <cstdio>
#define INF 1000000000000
#define MOD 1000000007ll
#define EPS 1e-10
#define REP(i,m) for(long long i=0; i<m; i++)
#define FOR(i,n,m) for(long long i=n; i<m; i++)
#define DUMP(a) for(long long dump=0; dump<(ll)a.size(); dump++) { cout<<a[dump]; if(dump!=(ll)a.size()-1) cout<<" "; else cout<<endl; }
#define ALL(v) v.begin(),v.end()
#define pb push_back
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef long double ld;
using namespace std;

int main(){
	int a, b, c;
	cin >> a >> b >> c;
	if(a == b && b == c && a%2 == 0) cout << -1 << endl;
	else{
		int pa = 0, pb = 0, pc = 0;
		while(a%2 == 0){
			a /= 2;
			pa++;
		}
		while(b%2 == 0){
			b /= 2;
			pb++;
		}
		while(c%2 == 0){
			c /= 2;
			pc++;
		}
		cout << min(pa, min(pb, pc)) + 1 << endl;
	}
	return 0;
}

Submission Info

Submission Time
Task A - Cookie Exchanges
User EctoPlasma
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1057 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 2
WA × 1
AC × 7
WA × 10
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 WA 1 ms 256 KB
in10.txt WA 1 ms 256 KB
in11.txt AC 1 ms 256 KB
in2.txt WA 1 ms 256 KB
in3.txt WA 1 ms 256 KB
in4.txt WA 1 ms 256 KB
in5.txt AC 1 ms 256 KB
in6.txt WA 1 ms 256 KB
in7.txt WA 1 ms 256 KB
in8.txt WA 1 ms 256 KB
in9.txt AC 1 ms 256 KB
sample1.txt AC 1 ms 256 KB
sample2.txt AC 1 ms 256 KB
sample3.txt WA 1 ms 256 KB