// 2022 IUSB Programming Competition // Round 1 Problem 2 // Credit Card Number // Solution by Liguo Yu #include #include using namespace std; int main() { char c1[17]; cin.getline(c1, 17); int total = 0; string s = c1; for (int i = 0; i < 16; i++) { char c = s.at(i); char * s = new char[2]; s[0] = c; total = total + atoi(s); } if (total % 29 == 5) cout << "valid"; else cout << "not valid"; return 1; }