QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#302751 | #2549. King's Palace | chaoshxxu | WA | 1ms | 3428kb | C++20 | 219b | 2024-01-11 11:05:32 | 2024-01-11 11:05:32 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int main() {
int n; cin>>n;
while (n--) {
long long a; cin>>a;
double d = sqrt(1 + 8*a);
long long b = (d-1)/2;
cout<<b<<"\n";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3428kb
input:
2 3 1 R 2 R 1 G 2 R 1 B 2 G
output:
2 1
result:
wrong answer expected '6', found '2'