题意&思路:巴什博奕,点m是n点。。。然后往前画即可。。。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
/************************************************************************* > File Name: code/hdu/2149.cpp > Author: 111qqz > Email: rkz2013@126.com > Created Time: 2015年09月22日 星期二 20时18分02秒 ************************************************************************/ #include<iostream> #include<iomanip> #include<cstdio> #include<algorithm> #include<cmath> #include<cstring> #include<string> #include<map> #include<set> #include<queue> #include<vector> #include<stack> #include<cctype> #define y1 hust111qqz #define yn hez111qqz #define j1 cute111qqz #define ms(a,x) memset(a,x,sizeof(a)) #define lr dying111qqz using namespace std; #define For(i, n) for (int i=0;i<int(n);++i) typedef long long LL; typedef double DB; const int inf = 0x3f3f3f3f; int n,m; int main() { #ifndef ONLINE_JUDGE freopen("in.txt","r",stdin); #endif while (scanf("%d %d",&m,&n)!=EOF) { if (m<n+1) { printf("%d",m); for ( int i = m+1 ; i <= n; i++) printf(" %d",i); printf("\n"); continue; } int tmp = m%(n+1); if (tmp>0) { printf("%d\n",tmp); } else { puts("none"); } } #ifndef ONLINE_JUDGE fclose(stdin); #endif return 0; } |
说点什么
您将是第一位评论人!