Code Submission Evaluation System Login

HIIT Open 2017

Start:2017-05-27 11:00:00
End:2017-05-27 16:00:00
 

Tasks | Messages | Scoreboard | Statistics


CSES - HIIT Open 2017 - Results
History
2017-05-27 14:05:47
2017-05-27 12:58:05
Task:Epic set
Sender:Ace of Spades
Submission time:2017-05-27 14:05:47
Language:C++
Status:READY
Result:ACCEPTED

Test results

testverdicttime (s)
#1ACCEPTED0.05 / 0.50details
#2ACCEPTED0.05 / 0.50details
#3ACCEPTED0.04 / 0.50details
#4ACCEPTED0.07 / 0.50details
#5ACCEPTED0.05 / 0.50details
#6ACCEPTED0.06 / 0.50details
#7ACCEPTED0.07 / 0.50details
#8ACCEPTED0.07 / 0.50details
#9ACCEPTED0.04 / 0.50details
#10ACCEPTED0.04 / 0.50details
#11ACCEPTED0.07 / 0.50details
#12ACCEPTED0.04 / 0.50details
#13ACCEPTED0.06 / 0.50details
#14ACCEPTED0.04 / 0.50details
#15ACCEPTED0.04 / 0.50details
#16ACCEPTED0.05 / 0.50details
#17ACCEPTED0.04 / 0.50details
#18ACCEPTED0.05 / 0.50details
#19ACCEPTED0.04 / 0.50details
#20ACCEPTED0.04 / 0.50details
#21ACCEPTED0.05 / 0.50details
#22ACCEPTED0.03 / 0.50details
#23ACCEPTED0.04 / 0.50details
#24ACCEPTED0.05 / 0.50details
#25ACCEPTED0.04 / 0.50details
#26ACCEPTED0.05 / 0.50details
#27ACCEPTED0.06 / 0.50details
#28ACCEPTED0.04 / 0.50details
#29ACCEPTED0.05 / 0.50details
#30ACCEPTED0.04 / 0.50details
#31ACCEPTED0.04 / 0.50details
#32ACCEPTED0.03 / 0.50details
#33ACCEPTED0.06 / 0.50details
#34ACCEPTED0.05 / 0.50details
#35ACCEPTED0.04 / 0.50details
#36ACCEPTED0.04 / 0.50details
#37ACCEPTED0.05 / 0.50details
#38ACCEPTED0.03 / 0.50details
#39ACCEPTED0.06 / 0.50details
#40ACCEPTED0.04 / 0.50details
#41ACCEPTED0.04 / 0.50details
#42ACCEPTED0.05 / 0.50details
#43ACCEPTED0.05 / 0.50details
#44ACCEPTED0.04 / 0.50details
#45ACCEPTED0.05 / 0.50details

Code

#include<bits/stdc++.h>

using namespace std;

int main(void) {
    cout << std::fixed << setprecision(12);
    int64_t a, b;
    cin >> a >> b;

    if (b == 4) {
	if (a <= 2) {
	    cout << 0.5 << '\n';
	} else {
	    cout << 0 << '\n';
	}
    } else if (b == 8) {
	if (a == 1 || a == 2 || a == 4) {
	    cout << 1.0/3.0 << '\n';
	} else {
	    cout << 0 << '\n';
	}
    } else {
	cout << (log(a+1) - log(a))/log(b) << '\n';
    }

    return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
1 2
view   save

correct output
1
view   save

user output
1.000000000000
view   save

Test 2

Verdict: ACCEPTED

input
1 3
view   save

correct output
0.630929754
view   save

user output
0.630929753571
view   save

Test 3

Verdict: ACCEPTED

input
2 3
view   save

correct output
0.369070246
view   save

user output
0.369070246429
view   save

Test 4

Verdict: ACCEPTED

input
1 4
view   save

correct output
0.5
view   save

user output
0.500000000000
view   save

Test 5

Verdict: ACCEPTED

input
2 4
view   save

correct output
0.5
view   save

user output
0.500000000000
view   save

Test 6

Verdict: ACCEPTED

input
3 4
view   save

correct output
0
view   save

user output
0
view   save

Test 7

Verdict: ACCEPTED

input
1 5
view   save

correct output
0.430676558
view   save

user output
0.430676558073
view   save

Test 8

Verdict: ACCEPTED

input
2 5
view   save

correct output
0.251929636
view   save

user output
0.251929636413
view   save

Test 9

Verdict: ACCEPTED

input
3 5
view   save

correct output
0.178746922
view   save

user output
0.178746921661
view   save

Test 10

Verdict: ACCEPTED

input
4 5
view   save

correct output
0.138646884
view   save

user output
0.138646883853
view   save

Test 11

Verdict: ACCEPTED

input
1 6
view   save

correct output
0.386852807
view   save

user output
0.386852807235
view   save

Test 12

Verdict: ACCEPTED

input
2 6
view   save

correct output
0.226294386
view   save

user output
0.226294385531
view   save

Test 13

Verdict: ACCEPTED

input
3 6
view   save

correct output
0.160558422
view   save

user output
0.160558421704
view   save

Test 14

Verdict: ACCEPTED

input
4 6
view   save

correct output
0.124538787
view   save

user output
0.124538787235
view   save

Test 15

Verdict: ACCEPTED

input
5 6
view   save

correct output
0.101755598
view   save

user output
0.101755598296
view   save

Test 16

Verdict: ACCEPTED

input
1 7
view   save

correct output
0.356207187
view   save

user output
0.356207187108
view   save

Test 17

Verdict: ACCEPTED

input
2 7
view   save

correct output
0.208367847
view   save

user output
0.208367846946
view   save

Test 18

Verdict: ACCEPTED

input
3 7
view   save

correct output
0.147839340
view   save

user output
0.147839340162
view   save

Test 19

Verdict: ACCEPTED

input
4 7
view   save

correct output
0.114673101
view   save

user output
0.114673101131
view   save

Test 20

Verdict: ACCEPTED

input
5 7
view   save

correct output
0.093694746
view   save

user output
0.093694745815
view   save

Test 21

Verdict: ACCEPTED

input
6 7
view   save

correct output
0.079217779
view   save

user output
0.079217778838
view   save

Test 22

Verdict: ACCEPTED

input
1 8
view   save

correct output
0.333333333
view   save

user output
0.333333333333
view   save

Test 23

Verdict: ACCEPTED

input
2 8
view   save

correct output
0.333333333
view   save

user output
0.333333333333
view   save

Test 24

Verdict: ACCEPTED

input
3 8
view   save

correct output
0
view   save

user output
0
view   save

Test 25

Verdict: ACCEPTED

input
4 8
view   save

correct output
0.333333333
view   save

user output
0.333333333333
view   save

Test 26

Verdict: ACCEPTED

input
5 8
view   save

correct output
0
view   save

user output
0
view   save

Test 27

Verdict: ACCEPTED

input
6 8
view   save

correct output
0
view   save

user output
0
view   save

Test 28

Verdict: ACCEPTED

input
7 8
view   save

correct output
0
view   save

user output
0
view   save

Test 29

Verdict: ACCEPTED

input
1 9
view   save

correct output
0.315464877
view   save

user output
0.315464876786
view   save

Test 30

Verdict: ACCEPTED

input
2 9
view   save

correct output
0.184535123
view   save

user output
0.184535123214
view   save

Test 31

Verdict: ACCEPTED

input
3 9
view   save

correct output
0.130929754
view   save

user output
0.130929753571
view   save

Test 32

Verdict: ACCEPTED

input
4 9
view   save

correct output
0.101557007
view   save

user output
0.101557006788
view   save

Test 33

Verdict: ACCEPTED

input
5 9
view   save

correct output
0.082978116
view   save

user output
0.082978116427
view   save

Test 34

Verdict: ACCEPTED

input
6 9
view   save

correct output
0.070156998
view   save

user output
0.070156997795
view   save

Test 35

Verdict: ACCEPTED

input
7 9
view   save

correct output
0.060772756
view   save

user output
0.060772755776
view   save

Test 36

Verdict: ACCEPTED

input
8 9
view   save

correct output
0.053605370
view   save

user output
0.053605369643
view   save

Test 37

Verdict: ACCEPTED

input
1 10
view   save

correct output
0.301029996
view   save

user output
0.301029995664
view   save

Test 38

Verdict: ACCEPTED

input
2 10
view   save

correct output
0.176091259
view   save

user output
0.176091259056
view   save

Test 39

Verdict: ACCEPTED

input
3 10
view   save

correct output
0.124938737
view   save

user output
0.124938736608
view   save

Test 40

Verdict: ACCEPTED

input
4 10
view   save

correct output
0.096910013
view   save

user output
0.096910013008
view   save

Test 41

Verdict: ACCEPTED

input
5 10
view   save

correct output
0.079181246
view   save

user output
0.079181246048
view   save

Test 42

Verdict: ACCEPTED

input
6 10
view   save

correct output
0.066946790
view   save

user output
0.066946789631
view   save

Test 43

Verdict: ACCEPTED

input
7 10
view   save

correct output
0.057991947
view   save

user output
0.057991946978
view   save

Test 44

Verdict: ACCEPTED

input
8 10
view   save

correct output
0.051152522
view   save

user output
0.051152522447
view   save

Test 45

Verdict: ACCEPTED

input
9 10
view   save

correct output
0.045757491
view   save

user output
0.045757490561
view   save