2 Star 0 Fork 0

BESTI.IS.JAVA2018/20165337

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
kehou1.java 691 Bytes
一键复制 编辑 原始数据 按行查看 历史
import java.util.*;
public class Y {
public static void main(String args[]) {
Stack<Integer> stack=new Stack<Integer>();
stack.push(new Integer(3));
stack.push(new Integer(8));
int k=1;
while(k<=10) {
for(int i=1;i<=2;i++) {
Integer F1=stack.pop();
int f1=F1.intValue();
Integer F2=stack.pop();
int f2=F2.intValue();
Integer temp=new Integer(2*f1+2*f2);
System.out.println(""+temp.toString());
stack.push(temp);
stack.push(F2);
k++;
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/BESTI-IS-JAVA-2018/20165337.git
git@gitee.com:BESTI-IS-JAVA-2018/20165337.git
BESTI-IS-JAVA-2018
20165337
20165337
master

搜索帮助