nyist-278
来源:互联网 发布:mac风扇声音大 编辑:程序博客网 时间:2024/04/29 05:31
#include<stdio.h>#define N 1000000int a[N];int main(){ int i,n,m,x; scanf("%d",&n); while(n--) { scanf("%d%d",&m,&x); int f=1,r=m; for(i=1;i<=m;i++) a[i]=i; if(m==1) printf("1\n"); else { while(f!=r) { if(f%x) {a[++r]=a[f];f++;} else f++; } printf("%d\n",a[f]); } } return 0;}
- nyist-278
- nyist
- nyist-673
- nyist-94
- nyist-676
- nyist-663
- nyist-34
- nyist-33
- nyist-480
- nyist-527
- nyist-79
- nyist-23
- nyist-205
- nyist-96
- nyist-244
- nyist-85
- nyist-252
- nyist-102
- 数码管00~99显示,
- 教你在面试中“反客为主”
- IBM技术笔试题型 -2009.11.7
- 闹钟2
- 关于EXT开端的
- nyist-278
- 采用线程池实现多线程一:没有返回值
- HDU--杭电--1016--Prime Ring Problem--深度优先搜索--此类中的水题
- 数字推理题题型简介及应对策略 zz
- 7.9.2: Bean 销毁之前的行为
- Java 软件工程师_曹建波
- 部分IT公司笔试算法题
- CF 148 div1 A
- vs2010插件