5397 키로거 문제 풀이 #include #include using namespace std; void fast_io(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); } int main(void) { fast_io(); int t; cin >> t; while (t--) { string str; list l; cin >> str; list::iterator iter = l.end(); for (int i = 0; i < str.length(); i++) { if (isdigit(str[i]) || isalpha(str[i])) l.insert(iter, str[i]); else if (str[i] == ''..