当前位置:网站首页>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);
}
}
结果:
边栏推荐
猜你喜欢

1002 Write the number (20 points)

3GPP LTE/NR信道模型

【Pytorch】nn.Linear,nn.Conv

tf.cast(), reduce_min(), reduce_max()

tf中自减操作;tf.assign_sub()

Pico neo3 Unity打包设置

Resolved EROR 1064 (42000): You have an error in. your SOL syntax. check the manual that corresponds to yo

1036 跟奥巴马一起编程 (15 分)

1051 复数乘法 (15 分)

年薪40W测试工程师成长之路,你在哪个阶段?
随机推荐
如何选择专业、安全、高性能的远程控制软件
TF中的四则运算
为什么我使用C#操作MySQL进行中文查询失败
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
Depth (relay supervision)
基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
There may be fields that cannot be serialized in the abnormal object of cdc and sqlserver. Is there anyone who can understand it? Help me to answer
Redis测试
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
Unity底层是如何处理C#的
TF中的One-hot
国密规范 SM2 SM3 SM4
Internet phone software or consolidation of attack must be "free" calls security clearance
为什么C#中对MySQL不支持中文查询
1101 B是A的多少倍 (15 分)
Pytorch模型转ONNX模型
公牛10-11德里克·罗斯最强赛季记录
How Unity handles C# under the hood
Daily sql-statistics of the number of professionals (including the number of professionals is 0)
buu—Re(5)