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

Compiler report

input/code.cpp:1:1: error: stray '\377' in program
 ÿþ#
 ^
input/code.cpp:1:1: error: stray '\376' in program
input/code.cpp:1:3: error: stray '#' in program
input/code.cpp:1:4: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:6: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:8: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:10: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:12: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:14: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:16: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:18: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:22: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:24: warning: null character(s) ignored [enabled by default]
input/code.cpp:1:26: warning: null character(s) ignored [enabled by default...

Code

ÿþ#include <iostream>

#include <string>





std::string b(int x) {

  switch (x) {

  case 1:

    return "1";

  case 2:

    return "11";

  case 3:

    return "10";

  case 4:

    return "1111";

  case 5:

    return "100";

  case 6:

    return "101";

  case 7:

    return "1000";

  case 8:

    return "1100";

  case 9:

    return "1001";

  case 10:

    return "1111111111";

  }

}





int main() {

  int x;

  std::cin >> x;



  std::cout << b(x) << '\n';



  return 0;

}