New answers tagged

0

Your code probably fails because of your use of scanf(...) == 3, or because of your use of getchar(). Consider this alternative instead: #include <iostream> int main() { int num_tests; std::cin >> num_tests; for (int k = 0; k < num_tests; ++k) { int n; std::cin >> n; std::cout << n << "\n"; ...


Top 50 recent answers are included