Submission #7079568


Source Code Expand

Copy
#include<iostream>
#include<vector>
#include<string>
#include <cmath>
using namespace std;

int main()
{
	int n,res;
	int ans[7];
	cin >> n;
	for( int i = 0; i < 7; i++ )
	{
		ans[i] = pow(2,i);
	}

	for( int i = 0; i < 7; i++ )
	{
		if( n > ans[i] )
		{
			res = ans[i];
		}else if( n == 1 )
		{
			res = 1;
		}
	}

	cout << res << endl;
	return 0;
}

Submission Info

Submission Time
Task B - Break Number
User Bomuhishisu
Language C++14 (GCC 5.4.1)
Score 0
Code Size 382 Byte
Status
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
× 3
× 1
× 14
× 3
Set Name Test Cases
Sample example0, example1, example2, example3
All example0, example1, example2, example3, handmade0, handmade1, handmade2, rand0, rand1, rand2, rand3, rand4, rand5, rand6, rand7, rand8, rand9
Case Name Status Exec Time Memory
example0 1 ms 256 KB
example1 1 ms 256 KB
example2 1 ms 256 KB
example3 1 ms 256 KB
handmade0 1 ms 256 KB
handmade1 1 ms 256 KB
handmade2 1 ms 256 KB
rand0 1 ms 256 KB
rand1 1 ms 256 KB
rand2 1 ms 256 KB
rand3 1 ms 256 KB
rand4 1 ms 256 KB
rand5 1 ms 256 KB
rand6 1 ms 256 KB
rand7 1 ms 256 KB
rand8 1 ms 256 KB
rand9 1 ms 256 KB