打表找规律
#include<cstdio> using namespace std; int F[20]={0,1,1,2,3,0,3,3,1,4,0,4,4,3,2,0,2,2,4,1}; int main(){ int q; scanf("%d",&q); while (q--){ int x; scanf("%d",&x); printf("%d ",F[x%20]); } return 0; }