#include<stdio.h>
int main()
{
int n,a[],b[];
while(scanf("%d",&n)!=EOF)
{
for(int i=;i<n;i++)
{
scanf("%d",&a[i]);
} for(int i=;i<n;i++)
{
b[i-]=a[i];
}
b[n-]=a[]; for(int i=;i<n-;i++)
{
printf("%d ",b[i]);
}
printf("%d\n",b[n-]);
}
return ;
}

Problem B: 零起点学算法92——元素前移1位的更多相关文章

  1. Problem H: 零起点学算法103——查找最大元素

    #include<stdio.h> #include<string.h> int main() { ]; while(gets(a)!=NULL) { ]; ;a[i]!='\ ...

  2. Problem A: 零起点学算法91——找出一个数组中出现次数最多的那个元素

    #include<stdio.h> int main() { ],b[]={}; while(scanf("%d",&n)!=EOF) { ;i<n;i+ ...

  3. Problem B: 零起点学算法81——找出数组中最大元素的位置(下标值

    #include<stdio.h> int main(void) { ],i,max; while(scanf("%d",&n)!=EOF) { ;i<n ...

  4. 1185: 零起点学算法92——单词数(C)

    一.题目 http://acm.wust.edu.cn/problem.php?id=1185&soj=0 二.分析 统计的是不同的单词数,即重复的单词只统计一次: 多组输入: 每行不超过10 ...

  5. Problem H: 零起点学算法109——单数变复数

    #include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...

  6. Problem G: 零起点学算法106——首字母变大写

    #include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...

  7. Problem D: 零起点学算法95——弓型矩阵

    #include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...

  8. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  9. Problem E: 零起点学算法34——3n+1问题

    #include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...

随机推荐

  1. Collection包结构,与Collections的区别

    Collection 1.Collection是集合类的顶级接口: 2.实现接口和类主要有Set.List.LinkedList.ArrayList.Vector.Stack.Set: Collect ...

  2. java基础 运算符

    算数运算符 加号:在操作数值.字符.字符串时其结果是不同的,当两个字符相加得到的是ASCII码表值, 当两个字符串相加时表示将两个字符串连接在一起,从而组成新的字符串. 除号:整数在使用除号操作时,得 ...

  3. epoll内核源码分析

    转载:https://www.nowcoder.com/discuss/26226?type=0&order=0&pos=27&page=1 /*  *  fs/eventpo ...

  4. Deep Learning基础--参数优化方法

    1. 深度学习流程简介 1)一次性设置(One time setup)          -激活函数(Activation functions) - 数据预处理(Data Preprocessing) ...

  5. Python的数值和字符串

    Python数据类型 1.数值 --类型:  1/整型 2/长整型   3/浮点型 -- 0.0, 12.0, -18.8, 3e+7等 4/复数型 -- complex  In []: 0x34al ...

  6. Python在线教程

    Python 3.x的 http://www.ziqiangxuetang.com/python3/python3-stdlib.html 廖雪峰的官方网站 http://www.liaoxuefen ...

  7. php的设计模式------工厂模式

    1.工厂模式简介 属于创建型模式.定义一个创建对象的接口,让其子类自己决定实例化哪一个工厂类,工厂模式使其创建过程延迟到子类进行主要解决的问题:接口选择的问题. 2.分类 2.1 简单工厂模式 接口: ...

  8. html,js一个元素做两次不同点击事件

    业务需求:一个按钮,第一次点击,修改页面内容,第二次点击,提交修改. 刚开始,我绑定了第一个click事件,用于让右边的内容可编辑.如:$('#id').click(function(){...}); ...

  9. 利用WINDOWS活动目录提供LDAP的方案

    Windows Server 2008 R2 活动目录服务安装 http://blog.sina.com.cn/s/blog_622de9390100kgv3.html WINDOWS 2008 域控 ...

  10. HTTP协议——请求与响应

    摘要:1.HTTPHTTP:HyperTextTransferProtocol,超文本传输协议的缩写,是本地浏览器和服务器之间进行通信的传送协议.基于TCP/IP协议来传送数据,如HTML文件,图片等 ...