fork download
  1. #include<iostream>
  2. #include<string>
  3. #define o std::cout
  4. int main() {
  5. auto s = ""s;
  6. std::cin >> s;
  7. for (char c : "2468")
  8. for (char& k : s)
  9. if (k == c) {
  10. o << (&k - &s[0]) << ',' << c;
  11. return 0;
  12. }
  13. o << "-1,8";
  14. }
Compilation error #stdin compilation error #stdout 0s 3476KB
stdin
637829
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:14: error: unable to find string literal operator ‘operator"" s’
     auto s = ""s;
              ^
prog.cpp:8:24: error: unable to deduce ‘auto&&’ from ‘s’
         for (char& k : s)
                        ^
stdout
Standard output is empty