精华帖 (0) :: 良好帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2009-02-28
第二题:
int[][] test = new int[12][31]; int max = 0; int currentM =0,currentD=0; String line ; while((line = in.readLine())!=null){ int m = Integer.parser(line.substring(4,6)); int d = Integer.parser(line.substring(6,8)); test[m][d]++; if(test[m][d]>max){ max = test[m][d]; currentM = m; currentD = d; } } |
|
返回顶楼 | |
发表时间:2009-02-28
int[][] test = new int[12][31];
int max = 0; int currentM =0,currentD=0; String line ; while((line = in.readLine())!=null){ int m = Integer.parser(line.substring(4,6)); int d = Integer.parser(line.substring(6,8)); test[m][d]++; if(test[m][d]>max){ max = test[m][d]; currentM = m; currentD = d; } } |
|
返回顶楼 | |