Submission #3252229


Source Code Expand

Copy
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define For(i, a, b) for(int i = (a); i < (b); i++)
#define Rep(i, n) For(i, 0, (n))
#define Rrep(i, n) for(int i = (n - 1); i >= 0; i--)
#define Itr(i, c) for(typeof(c.begin()) i = c.begin(); i != c.end(); i++)
#define pb push_back

const int inf = 999999999;
const int mod = 1000000007;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

int main(){
	int a, b, c; cin >> a >> b >> c;
	cout << max(a * 10 + b + c, max(a + b * 10 + c, a + b + c * 10)) << endl;
	return 0;
}

Submission Info

Submission Time
Task A - Maximize the Formula
User niimi
Language C++14 (GCC 5.4.1)
Score 100
Code Size 597 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
All 100 / 100 sample_01, sample_02, sample_03, testcase1, testcase2, testcase3, testcase4, testcase5, testcase6, testcase7
Sample 0 / 0 sample_01, sample_02, sample_03
Case Name Status Exec Time Memory
sample_01 1 ms 256 KB
sample_02 1 ms 256 KB
sample_03 1 ms 256 KB
testcase1 1 ms 256 KB
testcase2 1 ms 256 KB
testcase3 1 ms 256 KB
testcase4 1 ms 256 KB
testcase5 1 ms 256 KB
testcase6 1 ms 256 KB
testcase7 1 ms 256 KB