#include using namespace std; bool used[10]; int main() { // 入力 int a[9]; for (int i = 0; i < 9; i++) cin >> a[i]; for (int i = 0; i < 9; i++) used[a[i]-1] = true; int ans; for (int i = 0; i < 10; i++) { if (!used[i]) ans = i + 1; } // 解答 cout << ans << endl; return 0; }