QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#99729#5377. $N$ 门问题zhouhuanyi0 2ms3752kbC++23508b2023-04-23 16:22:082023-04-23 16:22:12

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-04-23 16:22:12]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:3752kb
  • [2023-04-23 16:22:08]
  • 提交

answer

#include<iostream>
#include<cstdio>
#define N 50000
using namespace std;
long long read()
{
    char c=0;
    long long sum=0;
    while (c<'0'||c>'9') c=getchar();
    while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
    return sum;
}
long long T,a,b;
double ans;
int main()
{
    T=read();
    while (T--) a=read(),b=read();
    if (a<2) puts("error");
    else if (a==2) ans=1.0/2;
    else if (a==3) ans=2.0/3;
    else ans=5.0/8;
    printf("%0.6lf\n",ans);
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 5
Accepted
time: 2ms
memory: 3700kb

input:

1
2 3

output:

0.500000

result:

ok single line: '0.500000'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

1
3 5

output:

0.666667

result:

ok single line: '0.666667'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3704kb

input:

1
4 5

output:

0.625000

result:

ok single line: '0.625000'

Test #4:

score: -5
Wrong Answer
time: 0ms
memory: 3568kb

input:

1
0 4

output:

error
0.000000

result:

wrong output format Extra information in the output file

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 2ms
memory: 3568kb

input:

8
1 160005726539569
1 233
0 1
1 2947295521
1 686719856393
1 54289
1 12649337
1 37281334283719577

output:

error
0.000000

result:

wrong output format Extra information in the output file

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #1:

0%

Subtask #6:

score: 0
Wrong Answer

Test #57:

score: 0
Wrong Answer
time: 0ms
memory: 3752kb

input:

15
15 17
2 3
5 31
4 5
12 29
38 41
3 11
44 47
16 23
11 19
6 13
3 37
1 2
21 43
5 7

output:

0.625000

result:

wrong answer 1st lines differ - expected: '0.000000', found: '0.625000'

Subtask #7:

score: 0
Skipped

Dependency #1:

0%