当前位置:网站首页>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);
}
}
结果:
边栏推荐
- 从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系
- cdc连sqlserver异常对象可能有无法序列化的字段 有没有大佬看得懂的 帮忙解答一下
- ROS 话题通信理论模型
- Depth (relay supervision)
- go-grpc TSL认证 解决 transport: authentication handshake failed: x509 certificate relies on ... ...
- Unity3D 学习路线?
- 【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
- LeetCode brushing series -- 46. Full arrangement
- 【LeetCode每日一题】——682.棒球比赛
- prometheus学习4Grafana监控mysql&blackbox了解
猜你喜欢
随机推荐
3.2-分类-Logistic回归
【软件测试】(北京)字节跳动科技有限公司终面HR面试题
oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
A used in the study of EEG ultra scanning analysis process
技能在赛题解析:交换机防环路设置
1091 N-Defensive Number (15 points)
Edge provides label grouping functionality
ROS 话题通信理论模型
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
linux 安装mysql服务报错
TF中的四则运算
TF中使用softmax函数;
一张图了解JVM八大原子操作
1002 写出这个数 (20 分)
Unity游戏排行榜的制作与优化
Waldom Electronics宣布成立顾问委员会
2022-08-09 第四小组 修身课 学习笔记(every day)
软件测试基本流程有哪些?北京专业第三方软件检测机构安利
When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
1051 Multiplication of Complex Numbers (15 points)