QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#474983 | #9129. Quotient Sum | ucup-team3282# | WA | 0ms | 3684kb | C++20 | 383b | 2024-07-13 10:14:07 | 2024-07-13 10:14:08 |
Judging History
answer
#include<iostream>
#include<algorithm>
using namespace std;
int n;
long long p[1000050];
int main(){
cin>>n;
for(int i=1;i<=n;i++)cin>>p[i];
int ans=0;
sort(p+1,p+n+1);
for(int i=1;i<=n;i++){
if(p[i]==p[i+1]&&p[i+1]==p[i+2])ans++;
}
for(int i=1;i<n;i++){
if(p[i]!=p[i+1])ans=ans+p[i+1]/p[i];
}
cout<<ans<<endl;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
3 2 3 6
output:
3
result:
ok "3"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
2 15 4
output:
3
result:
ok "3"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3624kb
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: 3560kb
input:
9 12 9 5 17 2 6 7 1 15
output:
10
result:
wrong answer 1st words differ - expected: '6', found: '10'