QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#71973 | #2958. Betting | ricky0129# | AC ✓ | 2ms | 3804kb | C++14 | 599b | 2023-01-13 01:02:56 | 2023-01-13 01:02:59 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define pii pair<int,int>
#define pll pair<ll,ll>
#define vll vector<ll>
#define FOR(i,n) for(int i=0;i<n;i++)
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define f first
#define s second
const int MOD = (int)1e9+7;
int main()
{
int a;
cin>>a;
int b = 100-a;
double a1 = b/(double)a+1.0;
double a2 = a/(double)b+1.0;
printf("%.8lf\n%.8lf\n",a1,a2);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3548kb
input:
80
output:
1.25000000 5.00000000
result:
ok 2 numbers
Test #2:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
15
output:
6.66666667 1.17647059
result:
ok 2 numbers
Test #3:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
1
output:
100.00000000 1.01010101
result:
ok 2 numbers
Test #4:
score: 0
Accepted
time: 2ms
memory: 3568kb
input:
2
output:
50.00000000 1.02040816
result:
ok 2 numbers
Test #5:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
3
output:
33.33333333 1.03092784
result:
ok 2 numbers
Test #6:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
4
output:
25.00000000 1.04166667
result:
ok 2 numbers
Test #7:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
5
output:
20.00000000 1.05263158
result:
ok 2 numbers
Test #8:
score: 0
Accepted
time: 2ms
memory: 3600kb
input:
6
output:
16.66666667 1.06382979
result:
ok 2 numbers
Test #9:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
7
output:
14.28571429 1.07526882
result:
ok 2 numbers
Test #10:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
8
output:
12.50000000 1.08695652
result:
ok 2 numbers
Test #11:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
9
output:
11.11111111 1.09890110
result:
ok 2 numbers
Test #12:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
10
output:
10.00000000 1.11111111
result:
ok 2 numbers
Test #13:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
11
output:
9.09090909 1.12359551
result:
ok 2 numbers
Test #14:
score: 0
Accepted
time: 2ms
memory: 3800kb
input:
12
output:
8.33333333 1.13636364
result:
ok 2 numbers
Test #15:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
13
output:
7.69230769 1.14942529
result:
ok 2 numbers
Test #16:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
14
output:
7.14285714 1.16279070
result:
ok 2 numbers
Test #17:
score: 0
Accepted
time: 2ms
memory: 3668kb
input:
16
output:
6.25000000 1.19047619
result:
ok 2 numbers
Test #18:
score: 0
Accepted
time: 1ms
memory: 3544kb
input:
17
output:
5.88235294 1.20481928
result:
ok 2 numbers
Test #19:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
18
output:
5.55555556 1.21951220
result:
ok 2 numbers
Test #20:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
19
output:
5.26315789 1.23456790
result:
ok 2 numbers
Test #21:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
20
output:
5.00000000 1.25000000
result:
ok 2 numbers
Test #22:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
21
output:
4.76190476 1.26582278
result:
ok 2 numbers
Test #23:
score: 0
Accepted
time: 2ms
memory: 3572kb
input:
22
output:
4.54545455 1.28205128
result:
ok 2 numbers
Test #24:
score: 0
Accepted
time: 2ms
memory: 3552kb
input:
23
output:
4.34782609 1.29870130
result:
ok 2 numbers
Test #25:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
24
output:
4.16666667 1.31578947
result:
ok 2 numbers
Test #26:
score: 0
Accepted
time: 2ms
memory: 3568kb
input:
25
output:
4.00000000 1.33333333
result:
ok 2 numbers
Test #27:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
26
output:
3.84615385 1.35135135
result:
ok 2 numbers
Test #28:
score: 0
Accepted
time: 2ms
memory: 3792kb
input:
27
output:
3.70370370 1.36986301
result:
ok 2 numbers
Test #29:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
28
output:
3.57142857 1.38888889
result:
ok 2 numbers
Test #30:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
29
output:
3.44827586 1.40845070
result:
ok 2 numbers
Test #31:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
30
output:
3.33333333 1.42857143
result:
ok 2 numbers
Test #32:
score: 0
Accepted
time: 2ms
memory: 3552kb
input:
31
output:
3.22580645 1.44927536
result:
ok 2 numbers
Test #33:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
32
output:
3.12500000 1.47058824
result:
ok 2 numbers
Test #34:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
33
output:
3.03030303 1.49253731
result:
ok 2 numbers
Test #35:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
34
output:
2.94117647 1.51515152
result:
ok 2 numbers
Test #36:
score: 0
Accepted
time: 2ms
memory: 3724kb
input:
35
output:
2.85714286 1.53846154
result:
ok 2 numbers
Test #37:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
36
output:
2.77777778 1.56250000
result:
ok 2 numbers
Test #38:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
37
output:
2.70270270 1.58730159
result:
ok 2 numbers
Test #39:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
38
output:
2.63157895 1.61290323
result:
ok 2 numbers
Test #40:
score: 0
Accepted
time: 2ms
memory: 3668kb
input:
39
output:
2.56410256 1.63934426
result:
ok 2 numbers
Test #41:
score: 0
Accepted
time: 2ms
memory: 3792kb
input:
40
output:
2.50000000 1.66666667
result:
ok 2 numbers
Test #42:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
41
output:
2.43902439 1.69491525
result:
ok 2 numbers
Test #43:
score: 0
Accepted
time: 2ms
memory: 3696kb
input:
42
output:
2.38095238 1.72413793
result:
ok 2 numbers
Test #44:
score: 0
Accepted
time: 2ms
memory: 3664kb
input:
43
output:
2.32558140 1.75438596
result:
ok 2 numbers
Test #45:
score: 0
Accepted
time: 1ms
memory: 3668kb
input:
44
output:
2.27272727 1.78571429
result:
ok 2 numbers
Test #46:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
45
output:
2.22222222 1.81818182
result:
ok 2 numbers
Test #47:
score: 0
Accepted
time: 2ms
memory: 3600kb
input:
46
output:
2.17391304 1.85185185
result:
ok 2 numbers
Test #48:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
47
output:
2.12765957 1.88679245
result:
ok 2 numbers
Test #49:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
48
output:
2.08333333 1.92307692
result:
ok 2 numbers
Test #50:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
49
output:
2.04081633 1.96078431
result:
ok 2 numbers
Test #51:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
50
output:
2.00000000 2.00000000
result:
ok 2 numbers
Test #52:
score: 0
Accepted
time: 1ms
memory: 3548kb
input:
51
output:
1.96078431 2.04081633
result:
ok 2 numbers
Test #53:
score: 0
Accepted
time: 2ms
memory: 3596kb
input:
52
output:
1.92307692 2.08333333
result:
ok 2 numbers
Test #54:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
53
output:
1.88679245 2.12765957
result:
ok 2 numbers
Test #55:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
54
output:
1.85185185 2.17391304
result:
ok 2 numbers
Test #56:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
55
output:
1.81818182 2.22222222
result:
ok 2 numbers
Test #57:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
56
output:
1.78571429 2.27272727
result:
ok 2 numbers
Test #58:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
57
output:
1.75438596 2.32558140
result:
ok 2 numbers
Test #59:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
58
output:
1.72413793 2.38095238
result:
ok 2 numbers
Test #60:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
59
output:
1.69491525 2.43902439
result:
ok 2 numbers
Test #61:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
60
output:
1.66666667 2.50000000
result:
ok 2 numbers
Test #62:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
61
output:
1.63934426 2.56410256
result:
ok 2 numbers
Test #63:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
62
output:
1.61290323 2.63157895
result:
ok 2 numbers
Test #64:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
63
output:
1.58730159 2.70270270
result:
ok 2 numbers
Test #65:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
64
output:
1.56250000 2.77777778
result:
ok 2 numbers
Test #66:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
65
output:
1.53846154 2.85714286
result:
ok 2 numbers
Test #67:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
66
output:
1.51515152 2.94117647
result:
ok 2 numbers
Test #68:
score: 0
Accepted
time: 1ms
memory: 3796kb
input:
67
output:
1.49253731 3.03030303
result:
ok 2 numbers
Test #69:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
68
output:
1.47058824 3.12500000
result:
ok 2 numbers
Test #70:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
69
output:
1.44927536 3.22580645
result:
ok 2 numbers
Test #71:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
70
output:
1.42857143 3.33333333
result:
ok 2 numbers
Test #72:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
71
output:
1.40845070 3.44827586
result:
ok 2 numbers
Test #73:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
72
output:
1.38888889 3.57142857
result:
ok 2 numbers
Test #74:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
73
output:
1.36986301 3.70370370
result:
ok 2 numbers
Test #75:
score: 0
Accepted
time: 2ms
memory: 3536kb
input:
74
output:
1.35135135 3.84615385
result:
ok 2 numbers
Test #76:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
75
output:
1.33333333 4.00000000
result:
ok 2 numbers
Test #77:
score: 0
Accepted
time: 2ms
memory: 3548kb
input:
76
output:
1.31578947 4.16666667
result:
ok 2 numbers
Test #78:
score: 0
Accepted
time: 2ms
memory: 3528kb
input:
77
output:
1.29870130 4.34782609
result:
ok 2 numbers
Test #79:
score: 0
Accepted
time: 2ms
memory: 3692kb
input:
78
output:
1.28205128 4.54545455
result:
ok 2 numbers
Test #80:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
79
output:
1.26582278 4.76190476
result:
ok 2 numbers
Test #81:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
81
output:
1.23456790 5.26315789
result:
ok 2 numbers
Test #82:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
82
output:
1.21951220 5.55555556
result:
ok 2 numbers
Test #83:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
83
output:
1.20481928 5.88235294
result:
ok 2 numbers
Test #84:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
84
output:
1.19047619 6.25000000
result:
ok 2 numbers
Test #85:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
85
output:
1.17647059 6.66666667
result:
ok 2 numbers
Test #86:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
86
output:
1.16279070 7.14285714
result:
ok 2 numbers
Test #87:
score: 0
Accepted
time: 2ms
memory: 3672kb
input:
87
output:
1.14942529 7.69230769
result:
ok 2 numbers
Test #88:
score: 0
Accepted
time: 2ms
memory: 3660kb
input:
88
output:
1.13636364 8.33333333
result:
ok 2 numbers
Test #89:
score: 0
Accepted
time: 1ms
memory: 3528kb
input:
89
output:
1.12359551 9.09090909
result:
ok 2 numbers
Test #90:
score: 0
Accepted
time: 2ms
memory: 3668kb
input:
90
output:
1.11111111 10.00000000
result:
ok 2 numbers
Test #91:
score: 0
Accepted
time: 2ms
memory: 3700kb
input:
91
output:
1.09890110 11.11111111
result:
ok 2 numbers
Test #92:
score: 0
Accepted
time: 1ms
memory: 3568kb
input:
92
output:
1.08695652 12.50000000
result:
ok 2 numbers
Test #93:
score: 0
Accepted
time: 2ms
memory: 3664kb
input:
93
output:
1.07526882 14.28571429
result:
ok 2 numbers
Test #94:
score: 0
Accepted
time: 2ms
memory: 3696kb
input:
94
output:
1.06382979 16.66666667
result:
ok 2 numbers
Test #95:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
95
output:
1.05263158 20.00000000
result:
ok 2 numbers
Test #96:
score: 0
Accepted
time: 2ms
memory: 3696kb
input:
96
output:
1.04166667 25.00000000
result:
ok 2 numbers
Test #97:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
97
output:
1.03092784 33.33333333
result:
ok 2 numbers
Test #98:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
98
output:
1.02040816 50.00000000
result:
ok 2 numbers
Test #99:
score: 0
Accepted
time: 2ms
memory: 3724kb
input:
99
output:
1.01010101 100.00000000
result:
ok 2 numbers