QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#302751#2549. King's PalacechaoshxxuWA 1ms3428kbC++20219b2024-01-11 11:05:322024-01-11 11:05:32

Judging History

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

  • [2024-01-11 11:05:32]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3428kb
  • [2024-01-11 11:05:32]
  • 提交

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";
    }
}

详细

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'