QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#689755 | #9531. Weird Ceiling | Newback | Compile Error | / | / | C++98 | 465b | 2024-10-30 18:27:46 | 2024-10-30 18:27:48 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int a[110001];
int main(){
int T;
cin >> T;
while(T--){
int n;
cin >> n;
int t = 1;
long long sum =0;
for(int i=1;i<sqrt(n);i++){
if(n%i==0){
a[t++] = i;
a[t++] = n/i;
}
}
sort(a+1,a+t);
/*for(int i=1;i<t;i++){
cout << a[i] <<" ";
}*/
/*for(int i=2;i<t;i++){
sum+=(a[i]-a[i-1])*(n/a[i-1]);
}
sum+=n/a[t-1];
cout << sum << endl;
}
return 0;
}
Details
answer.code:22:17: error: unterminated comment 22 | /*for(int i=2;i<t;i++){ | ^ answer.code: In function ‘int main()’: answer.code:18:31: error: expected ‘}’ at end of input 18 | sort(a+1,a+t); | ^ answer.code:7:19: note: to match this ‘{’ 7 | while(T--){ | ^ answer.code:18:31: error: expected ‘}’ at end of input 18 | sort(a+1,a+t); | ^ answer.code:4:11: note: to match this ‘{’ 4 | int main(){ | ^