提交时间:2022-10-15 11:24:54
运行 ID: 60313
#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,m,a; int main(){ // freopen("S2.in","r",stdin); // freopen("S2.out","w",stdout); srand(time(0)); n=read(),m=read(); if(!m){ for(int i=1;i<=n;i++) printf("%d ",i); putchar(10); return 0; } if(m==1){ a=read(); for(int i=1;i<=n;i++) printf("%d ",(i+a-1)/a*a); putchar(10); return 0; } printf("%d\n",rand()); return 0; }