当前位置:网站首页>1056 组合数的和 (15 分)
1056 组合数的和 (15 分)
2022-08-11 06:46:00 【呆比特】
题目要求:
代码:
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);
}
}
结果:
边栏推荐
- 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?
- Pytorch模型转ONNX模型
- 【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
- Taobao API interface reference
- go-grpc TSL认证 解决 transport: authentication handshake failed: x509 certificate relies on ... ...
- Activity的四种状态
- NFT 的价值从何而来
- JD.com product details API call example explanation
- maxwell concept
- buu—Re(5)
猜你喜欢

从苹果、SpaceX等高科技企业的产品发布会看企业产品战略和敏捷开发的关系

【软件测试】(北京)字节跳动科技有限公司终面HR面试题

【软件测试】(北京)字节跳动科技有限公司二面笔试题

Douyin get douyin share password url API return value description

radix-4 FFT principle and C language code implementation

Edge 提供了标签分组功能

Multiscale communication in cortical-cortical networks

基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现

Implement general-purpose, high-performance sorting and quicksort optimizations

TF中的One-hot
随机推荐
Douyin API interface
Taobao sku API interface (PHP example)
Internet phone software or consolidation of attack must be "free" calls security clearance
接入网、承载网、核心网是什么,交换机路由器是什么、这个和网络的协议有什么关系呢?
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
tf.reduce_mean()与tf.reduce_sum()
TF中的条件语句;where()
2022-08-09 第四小组 修身课 学习笔记(every day)
进制转换间的那点事
JD.com product details API call example explanation
MindManager2022全新正式免费思维导图更新
oracle19c不支持实时同步参数,请教一下大佬们有什么好的解决办法吗?
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
JVM学习——3——数据一致性
radix-4 FFT principle and C language code implementation
2021-08-11 for循环结合多线程异步查询并收集结果
网络电话软件或迎整顿 “免费”通话须迈安全关
Daily sql: request for friend application pass rate
Unity底层是如何处理C#的