当前位置:网站首页>7-6 sum of combinatorial numbers
7-6 sum of combinatorial numbers
2022-07-06 16:43:00 【HBUcs2020】
The problem is very simple , But found a different solution
/ Enter each number in turn , The number of times each number appears in tens and tens is n-1
#include<iostream>
using namespace std;
int main()
{
int n,sum=0;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{
cin>>a[i];
// Enter each number in turn , The number of times each number appears in tens and tens is n-1
sum+=a[i]*11*(n-1);
}
// for(int i=0;i<n;i++)
// {
// for(int j=0;j<n;j++)
// {
// if(i!=j)
// sum+=a[i]*10+a[j];
// }
// }
cout<<sum<<endl;;
return 0;
}边栏推荐
- Codeforces Round #771 (Div. 2)
- < li> dot style list style type
- (lightoj - 1370) Bi shoe and phi shoe (Euler function tabulation)
- Codeforces - 1526C1&&C2 - Potions
- Research Report on market supply and demand and strategy of double drum magnetic separator industry in China
- Market trend report, technological innovation and market forecast of China's double sided flexible printed circuit board (FPC)
- 两个礼拜速成软考中级软件设计师经验
- Market trend report, technical innovation and market forecast of double-sided foam tape in China
- Sublime text code formatting operation
- sublime text 代码格式化操作
猜你喜欢

我在字节跳动「修电影」

两个礼拜速成软考中级软件设计师经验

Native JS realizes the functions of all selection and inverse selection -- Feng Hao's blog

Cmake Express

第一章 MapReduce概述

VMware Tools和open-vm-tools的安装与使用:解决虚拟机不全屏和无法传输文件的问题

第6章 DataNode

sublime text 代码格式化操作

Local visualization tools are connected to redis of Alibaba cloud CentOS server

LeetCode 1560. The sector with the most passes on the circular track
随机推荐
力扣leetcode第 280 场周赛
Research Report on market supply and demand and strategy of China's four flat leadless (QFN) packaging industry
Tert butyl hydroquinone (TBHQ) Industry Research Report - market status analysis and development prospect forecast
OneForAll安装使用
使用jq实现全选 反选 和全不选-冯浩的博客
第6章 DataNode
sublime text 代码格式化操作
Study notes of Tutu - process
Research Report of desktop clinical chemical analyzer industry - market status analysis and development prospect prediction
Anaconda下安装Jupyter notebook
Codeforces Round #799 (Div. 4)A~H
Calculate the time difference
Market trend report, technical innovation and market forecast of double-sided foam tape in China
Basic principles of video compression coding and audio compression coding
解决Intel12代酷睿CPU单线程调度问题(二)
Investigation report of bench type Brinell hardness tester industry - market status analysis and development prospect prediction
Submit several problem records of spark application (sparklauncher with cluster deploy mode)
Spark independent cluster dynamic online and offline worker node
Codeforces Round #803 (Div. 2)A~C
第2章 HFDS的Shell操作