当前位置:网站首页>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);
}
}
结果:
边栏推荐
- Redis测试
- 语音信号处理:预处理【预加重、分帧、加窗】
- tf中自减操作;tf.assign_sub()
- 从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中
- tf.cast(), reduce_min(), reduce_max()
- Amazon API interface Daquan
- 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?
- [Recommender System]: Overview of Collaborative Filtering and Content-Based Filtering
- 年薪40W测试工程师成长之路,你在哪个阶段?
- 线程交替输出(你能想出几种方法)
猜你喜欢
随机推荐
Go语言实现Etcd服务发现(Etcd & Service Discovery & Go)
pytorch,numpy两种方法实现nms类间+类内
恒源云-Pycharm远程训练避坑指南
LeetCode brushing series -- 46. Full arrangement
接口测试的基础流程和用例设计方法你知道吗?
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
国密规范 SM2 SM3 SM4
Pico neo3在Unity中的交互操作
深度监督(中继监督)
Tensorflow中使用tf.argmax返回张量沿指定维度最大值的索引
ssh服务攻防与加固
Taobao product details API interface
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
1081 检查密码 (15 分)
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
1003 我要通过 (20 分)
【Pytorch】nn.ReLU(inplace=True)
Implementation of FIR filter based on FPGA (5) - FPGA code implementation of parallel structure FIR filter
ROS 服务通信理论模型
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