回答編集履歴

1

nf

2023/07/27 07:37

投稿

TN8001
TN8001

スコア9678

test CHANGED
@@ -46,7 +46,7 @@
46
46
  int ave = getAverage(array);
47
47
 
48
48
  fill(0);
49
- text(join(array, " "), 50, 30);
49
+ text(join(nf(array, 0), " "), 50, 30);
50
50
  text("合計点:" + sum + " 平均点:" + ave, 50, 150);
51
51
  text("最大点:" + max(array) + " 最小点:" + min(array), 50, 180);
52
52
  }
@@ -64,12 +64,4 @@
64
64
  int ave = sum / array.length;
65
65
  return ave;
66
66
  }
67
-
68
- String join(int[] array, String sep) {
69
- String s = str(array[0]);
70
- for (int i = 1; i < array.length; i++) {
71
- s += sep + str(array[i]);
72
- }
73
- return s;
74
- }
75
67
  ```