51,410
社区成员
发帖
与我相关
我的任务
分享import java.util.*;
public class Main {
public static void main(String[] args) {
long[][] lst = {{1,2},{1,3},{1,4}};
long[] cm = {0};
for(int i=0;i<lst.length; i++)
{
if(i+1>cm.length)
cm=Arrays.copyOf(cm, cm.length+1);
cm[i]=(lst[i][lst[i].length-1])/(lst[i][0]);
System.out.printf("Hello %d", cm[i]);
}
}
}


import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
long[][] lst = {{1,2},{1,3},{1,4}};
List<Integer> cm = new ArrayList<Integer>();
for(int i=0;i<lst.length; i++)
{
cm.add(i);
System.out.printf("Hello %d", cm.get(i));
}
}
}