提交时间:2022-10-15 11:24:26

运行 ID: 60307

#include <bits/stdc++.h> using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); for(;ch<'0'||ch>'9';ch=getchar()) if(ch=='-') f=-1; for(;ch>='0'&&ch<='9';ch=getchar()) x=(x<<1)+(x<<3)+(ch^48); return x*f; } int n; int main(){ // freopen("J4.in","r",stdin); // freopen("J4.out","w",stdout); srand(time(0)); srand(rand()); n=read(); printf("%d\n",rand()%(n-1)+2); return 0; }