当前位置:网站首页>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;
}
边栏推荐
- Submit several problem records of spark application (sparklauncher with cluster deploy mode)
- Market trend report, technical innovation and market forecast of China's desktop capacitance meter
- Chapter 5 namenode and secondarynamenode
- Research Report on market supply and demand and strategy of Chinese table lamp industry
- Click QT button to switch qlineedit focus (including code)
- (POJ - 3186) treatments for the cows (interval DP)
- < li> dot style list style type
- Kubernetes cluster deployment
- Simply try the new amp model of deepfacelab (deepfake)
- Codeforces Round #800 (Div. 2)AC
猜你喜欢
Ffmpeg command line use
Base dice (dynamic programming + matrix fast power)
Sublime text code formatting operation
Li Kou: the 81st biweekly match
第6章 DataNode
(lightoj - 1323) billiard balls (thinking)
顺丰科技智慧物流校园技术挑战赛(无t4)
Kubernetes集群部署
Local visualization tools are connected to redis of Alibaba cloud CentOS server
Chapter 5 yarn resource scheduler
随机推荐
Hbuilder X格式化快捷键设置
简单尝试DeepFaceLab(DeepFake)的新AMP模型
Research Report on market supply and demand and strategy of double drum magnetic separator industry in China
Cmake Express
Spark独立集群动态上线下线Worker节点
QT realizes window topping, topping state switching, and multi window topping priority relationship
<li>圆点样式 list-style-type
图像处理一百题(1-10)
ffmpeg命令行使用
Research Report on market supply and demand and strategy of China's four flat leadless (QFN) packaging industry
Mp4 format details
Acwing - game 55 of the week
Click QT button to switch qlineedit focus (including code)
Summary of game theory
Market trend report, technical innovation and market forecast of China's desktop capacitance meter
Codeforces Global Round 19
第2章 HFDS的Shell操作
Problem - 922D、Robot Vacuum Cleaner - Codeforces
(lightoj - 1323) billiard balls (thinking)
第三章 MapReduce框架原理