当前位置:网站首页>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);
}
}
结果:
边栏推荐
- Coordinate system in navigation and positioning
- opencv实现数据增强(图片+标签)平移,翻转,缩放,旋转
- daily sql - query for managers and elections with at least 5 subordinates
- SQL sliding window
- Trill keyword search goods - API
- Activity的四种状态
- Internet phone software or consolidation of attack must be "free" calls security clearance
- 数仓开发知识总结
- 一张图了解JVM八大原子操作
- 为什么C#中对MySQL不支持中文查询
猜你喜欢
Daily sql-employee bonus filtering and answer rate ranking first
6月各手机银行活跃用户较快增长,创半年新高
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
数仓开发知识总结
恒源云-Pycharm远程训练避坑指南
Douyin API interface
接口测试的基础流程和用例设计方法你知道吗?
Coordinate system in navigation and positioning
【LeetCode每日一题】——844.比较含退格的字符串
Daily sql: request for friend application pass rate
随机推荐
接入网、承载网、核心网是什么,交换机路由器是什么、这个和网络的协议有什么关系呢?
Daily SQL - find each of the students school gpa minimum (window)
Unity3D learning route?
Pico neo3 Unity打包设置
【深度学习】什么是互信息最大化?
SQL滑动窗口
技术分享 | 实战演练接口自动化如何处理 Form 请求?
2022-08-09 Group 4 Self-cultivation class study notes (every day)
关于Android Service服务的面试题
Douyin API interface
Find the shops that have sold more than 1,000 yuan per day for more than 30 consecutive days in the past six months
恒源云-Pycharm远程训练避坑指南
Taobao sku API interface (PHP example)
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
JD.com product details API call example explanation
Tf中的平方,多次方,开方计算
Redis + lua implements distributed interface current limiting implementation scheme
DDR4内存条电路设计
Multiscale communication in cortical-cortical networks
《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台