CSES - Datatähti 2023 alku - Results
Submission details
Task:Kertoma
Sender:Yamaxanadu
Submission time:2022-11-02 20:07:15 +0200
Language:C++ (C++11)
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:41:24: error: expected primary-expression before '>' token
   41 |                 if (x => pow(10,y) and x < pow(10,(y+1))) {
      |                        ^

Code

#include <bits/stdc++.h>

using namespace std;

int main() {
    int a, b, c, d, e, f, g, h, i, j, s, m, dig, digf;
    double x;
    m = 0;
    dig = 1;
    digf = 1;
    x = 1;
    cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j;
    s = a+b+c+d+e+f+g+h+i+j;
    if (s <= 6) {
	if (c == 1 and a == 0 and e == 0) {
	    cout << "2";
	}
	if (g == 1) {
	    cout << "3";
	}
	if (s == 2) {
	    cout << "4";
	}
	if (a == 1 and b == 1) {
	    cout << "5";
	}
	if (a == 1 and b == 0) {
	    cout << "6";
	}
    }
    else {
        for (int z = 1; z <= 30000; z++) {
	    x = x*z;
	    while (x > 1000000) {
	        if (x > 1000000) {
	            m = m+1;
	            x = x/1000000;
	        }
	    }
	    for (int y = 0; y <= 12; y++) {
	        if (x => pow(10,y) and x < pow(10,(y+1))) {
		    dig = y+1;
	        }
	    }
	    digf = 6*m+dig;
	    if (digf == s) {
	        cout << z;
	        break;
	    }
	}
    }
}