1128 -- 整数排序
来源:互联网 发布:淘宝上300块的投影仪 编辑:程序博客网 时间:2024/06/03 07:36
整数排序
Time Limit:1000MS Memory Limit:65536K
Total Submit:276 Accepted:164
Description
给10个整数a(i)(0=<ai<=1000)
输出排序好之后的序列
Input
输入为一行,包含10个无规则的整数,用空格分隔
Output
按照从小大排序后的十个整数
Sample Input
9 8 6 2 1 5 0 3 4 7
Sample Output
0 1 2 3 4 5 6 7 8 9
Source
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AK1128 { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(); int[] a = new int[10]; for (int i = 0; i < 10; i++) a[i] = int.Parse(s[i]); Array.Sort(a); foreach (int i in a) Console.Write(i + " "); Console.WriteLine(); //Console.ReadLine(); } } }
0 0
- 1128 -- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- 整数排序
- LeetCode之Contains Duplicate
- Cocos2d-x从入门到精通第六课《自定义绘制》
- 图片旋转特征点的获取
- 华为机试题:逛动物园
- self. 和 _ 的思考
- 1128 -- 整数排序
- Android与js交互实例
- 设计模式的依赖倒转原则再理解
- Android Https相关完全解析 当OkHttp遇到Https
- 后端分布式系列:分布式存储-HDFS Client 设计实现解析
- 在c++中,vector是一个十分有用的容器,下面对这个容器做一下总结。
- PHP has xxx Problem
- Android开发工具--Android studio开发常用插件和工具
- Hadoop第3周练习--Hadoop2.X编译安装和实验