CSES - Datatähti 2018 alku - Results
Submission details
Task:Bittijono
Sender:ArktinenKarpalo
Submission time:2017-10-05 19:58:12 +0300
Language:C++
Status:COMPILE ERROR

Compiler report

input/code.cpp: In function 'int main()':
input/code.cpp:10:8: error: expected ';' before numeric constant
   cout 1;
        ^
input/code.cpp:10:9: warning: statement has no effect [-Wunused-value]
   cout 1;
         ^
input/code.cpp:12:8: error: expected ';' before numeric constant
   cout 11;
        ^
input/code.cpp:12:10: warning: statement has no effect [-Wunused-value]
   cout 11;
          ^
input/code.cpp:14:8: error: expected ';' before numeric constant
   cout 10;
        ^
input/code.cpp:14:10: warning: statement has no effect [-Wunused-value]
   cout 10;
          ^
input/code.cpp:16:8: error: expected ';' before numeric constant
   cout 1111;
        ^
input/code.cpp:16:12: warning: statement has no effect [-Wunused-value]
   cout 1111;
            ^
input/code.cpp:18:8: error: expected ';' before numeric constant
   cout 110;
        ^
input/code.cpp:18:11: warning: statement has no effect [-Wunused-value]
   cout 110;
           ^
input/code.cpp:20:8: error: expected '...

Code

#include <bits/stdc++.h>

using namespace std;

int n;

int main() {
	cin >> n;
	if(n==1)
		cout 1;
	else if(n==2)
		cout 11;
	else if(n==3)
		cout 10;
	else if(n==4)
		cout 1111;
	else if(n==5)
		cout 110;
	else if(n==6)
		cout 101;
	else if(n==7)
		cout 1110;
	else if(n==8)
		cout 1101;
	else if(n==9)
		cout 1011;
	else if(n==10)
		cout 1010;
}