#include <iostream> using namespace std; int main() { int n; cin >> n; if (n == 1) { cout << 3 << endl; } else if ((n - 1) % 3 == 0) { cout << 1 << endl; } else if ((n - 1) % 3 == 1) { cout << 3 << endl; } else { cout << 2 << endl; } return 0; } [2024-09-08 18:12:38 | AI写代码神器 | 211点数解答]