博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
JAVA实现简单分组算法
阅读量:4364 次
发布时间:2019-06-07

本文共 845 字,大约阅读时间需要 2 分钟。

1 import java.util.ArrayList; 2 import java.util.Collections; 3 import java.util.List; 4  5 /** 6  * Created with IntelliJ IDEA. 7  * User: dell 8  * Date: 13-3-5 9  * Time: 下午8:3810  * To change this template use File | Settings | File Templates.11  */12 public class Group {13         public static void main(String[] args)14         {15             int[] i ={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18};16             int len = i.length;17             int count = len/5;18             //够4000的一组处理19             for(int j = 0 ; j < count ; j++)20             {21                 for(int m = 0 ; m<5;m++)22                     System.out.println(i[m+j*5]+"****"+m+j*5);23                 //进行处理24             }25             //剩下的不够4000的处理26             for(int m = 0 ; m

 

转载于:https://www.cnblogs.com/yangpigao/archive/2013/03/05/2945051.html

你可能感兴趣的文章
Leetcode-Unique Binary Search Trees II
查看>>
Centos7系统下安装Docker
查看>>
PostgreSQL 序列(SEQUENCE)
查看>>
Missing Number
查看>>
Ionic3 demo TallyBook 实例3
查看>>
laravel服务容器
查看>>
Entity Framework的查询
查看>>
ZH奶酪:Python按行读取文件
查看>>
07-使用循环进行遍历数组(运算符)
查看>>
控件布局通用解决方案
查看>>
scala流程控制语句以及方法和函数
查看>>
MySQL的sql_mode模式
查看>>
windows命令——explorer
查看>>
<转载>Bootstrap 入门教程 http://www.cnblogs.com/ventlam/archive/2012/05/28/2520703.html 系列...
查看>>
jquery和js cookie的使用解析
查看>>
类的内置方法
查看>>
世界是数字的 读后感
查看>>
算法项目步骤流程
查看>>
POJ 2942 Knights of the Round Table ★(点双连通分量+二分图判定)
查看>>
10.scheam.xml的配置
查看>>