CSES - Datatähti 2023 alku - Results
Submission details
Task:Kertoma
Sender:ZU7U
Submission time:2022-11-01 21:15:16 +0200
Language:C++17
Status:COMPILE ERROR

Compiler report

input/code.cpp:13:1: error: expected unqualified-id before '}' token
   13 | };
      | ^

Code

#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

class bint {
public:
	string dig;
	bint
};

int main() {
	
	int num; int len = 0; long long unsigned int count = 1;
	vector<int> table;

	for (int i = 0; i <= 9; i++) {
		cin >> num;
		len += num;
		table.push_back(num);
	}

	if (len == 1) {
		if (*max_element(table.begin(), table.end()) == 1) cout << 1;
		else if (*max_element(table.begin(), table.end()) == 2) cout << 2;
		else if (*max_element(table.begin(), table.end()) == 6) cout << 3;
	}
	else if (len == 3) {
		if (table[7] == 1) cout << 6;
		else cout << 5;
	}

	else {
		num = 2;
		while ((trunc(log10(count)) + 1) < len) {
			count = count * num;
			num++;
		}

		cout << num-1;
	}

	return 0;
}