#include <iostream>
#include <algorithm>
#include <cstring>
int func(int* arr, int length, int number){return std::find(arr,arr+length,number)-arr;}
int func(char* str, char ch){return std::find(str,str+std::strlen(str),ch)-str;}
int main() {
int arr[] {1,2,3};
std::cout<<func(arr,3,2)<<std::endl;
std::cout<<func("ABCDE",'E')<<std::endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y3N0cmluZz4KCmludCBmdW5jKGludCogYXJyLCBpbnQgbGVuZ3RoLCBpbnQgbnVtYmVyKXtyZXR1cm4gc3RkOjpmaW5kKGFycixhcnIrbGVuZ3RoLG51bWJlciktYXJyO30KaW50IGZ1bmMoY2hhciogc3RyLCBjaGFyIGNoKXtyZXR1cm4gc3RkOjpmaW5kKHN0cixzdHIrc3RkOjpzdHJsZW4oc3RyKSxjaCktc3RyO30KCmludCBtYWluKCkgewoJaW50IGFycltdIHsxLDIsM307CglzdGQ6OmNvdXQ8PGZ1bmMoYXJyLDMsMik8PHN0ZDo6ZW5kbDsKCXN0ZDo6Y291dDw8ZnVuYygiQUJDREUiLCdFJyk8PHN0ZDo6ZW5kbDsKfQ==