当前位置:网站首页>1056 Sum of Combinations (15 points)
1056 Sum of Combinations (15 points)
2022-08-11 07:48:00 【dumb bit】
题目要求:
代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
//輸入
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
String array[] = new String[n];
for (int i = 0; i < n; i++) {
array[i] = scanner.next();
}
int sum = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (i != j)
sum += Integer.valueOf(array[i] + array[j]);
}
}
System.out.println(sum);
}
}
结果:
边栏推荐
猜你喜欢
随机推荐
1091 N-Defensive Number (15 points)
进制转换间的那点事
1101 B是A的多少倍 (15 分)
伦敦银规则有哪些?
技术分享 | 实战演练接口自动化如何处理 Form 请求?
cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
1071 小赌怡情 (15 分)
从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中
2022-08-10 Group 4 Self-cultivation class study notes (every day)
What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
tf中自减操作;tf.assign_sub()
1036 跟奥巴马一起编程 (15 分)
1056 组合数的和 (15 分)
break pad源码编译--参考大佬博客的总结
oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
maxwell concept
测试用例很难?有手就行
【Pytorch】nn.Linear,nn.Conv
Shell:三剑客之awk
1091 N-自守数 (15 分)