acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 自己想

    呵呵!你被骗了

    userId_undefined

    小xu同学

    倔强青铜GESP2级GESP1级
    46阅读
    1回复
    3点赞
  • 接接接水问题

    userId_undefined

    entj

    时间刺客空间掌握者时空双修者出道萌新贪心·贪心尝试者快乐小狗
    38阅读
    0回复
    1点赞
  • 题解

    #include <bits/stdc++.h> using namespace std; bool cmp(int x,int y){ return x < y; } int main(){ int a[1010]={}; int n; int sum=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n,cmp); for(int i=0;i<n;i++){ sum+=a[i]*(n-i); } cout<<sum; }

    userId_undefined

    黑客

    27阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    zsy

    7月全勤卷王出道萌新题解仙人时间刺客时空双修者秩序白银
    11阅读
    0回复
    1点赞
  • ooooo

    ooooo

    userId_undefined

    ༺ཌༀ◎²£™༺◎ༀད༻₯₪₡㏄

    出道萌新倔强青铜
    12阅读
    1回复
    0点赞
  • sort

    #include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int a[100]; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a + n); int m = 0; for (int i = 0; i < n; i++) { m += a[i] * (n - i); } cout << m << endl; return 0; }

    userId_undefined

    181****9768

    13阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    LS_YZY

    出道萌新题解仙人时空双修者模拟·模拟练习生倔强青铜快乐小狗
    6阅读
    0回复
    0点赞
首页