QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#593552#9129. Quotient SumFolity#WA 0ms3676kbC++20340b2024-09-27 14:36:252024-09-27 14:36:25

Judging History

你现在查看的是最新测评结果

  • [2024-09-27 14:36:25]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3676kb
  • [2024-09-27 14:36:25]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

const int N=2e5+5;

int n;
ll a[N];
int main(){
    ios::sync_with_stdio(0);cin.tie(0);
    cin>>n;
    for(int i=1;i<=n;++i)cin>>a[i];
    sort(a+1,a+n+1);
    ll ans=0;
    for(int i=n;i>1;--i)ans+=a[i]/a[i-1];
    ans+=a[1]/a[n];
    cout<<ans<<'\n';
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3556kb

input:

3
2 3 6

output:

3

result:

ok "3"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3504kb

input:

2
15 4

output:

3

result:

ok "3"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3676kb

input:

9
284791808 107902 13660981249408 4622332661 13405199 24590921 361 244448137 16077087227955422

output:

4580

result:

ok "4580"

Test #4:

score: -100
Wrong Answer
time: 0ms
memory: 3616kb

input:

9
12 9 5 17 2 6 7 1 15

output:

10

result:

wrong answer 1st words differ - expected: '6', found: '10'