#include <iostream> using namespace std; int main() { int p = 1,q = 2,r = 3;//定义三个变量进行输出,将时间复杂度将至O(n) int res; cin>>res; if(res == 1){ cout<<1; return 0; } if(res == 2){ cout<<2; return 0; } for(int i=4;i<=re...