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 15:03:28
2017-05-27 15:02:14
2017-05-27 14:44:37
2017-05-27 14:36:14
2017-05-27 14:32:48
Task:Book writing
Sender:IOG
Submission time:2017-05-27 15:03:28
Language:C++
Status:READY
Result:WRONG ANSWER

Test results

testverdicttime (s)
#1WRONG ANSWER0.05 / 0.50details
#2ACCEPTED0.05 / 0.50details
#3ACCEPTED0.04 / 0.50details
#4ACCEPTED0.05 / 0.50details
#5TIME LIMIT EXCEEDED-- / 0.50details
#6TIME LIMIT EXCEEDED-- / 0.50details
#7TIME LIMIT EXCEEDED-- / 0.50details
#8TIME LIMIT EXCEEDED-- / 0.50details
#9TIME LIMIT EXCEEDED-- / 0.50details
#10TIME LIMIT EXCEEDED-- / 0.50details
#11TIME LIMIT EXCEEDED-- / 0.50details
#12TIME LIMIT EXCEEDED-- / 0.50details
#13TIME LIMIT EXCEEDED-- / 0.50details
#14TIME LIMIT EXCEEDED-- / 0.50details
#15TIME LIMIT EXCEEDED-- / 0.50details

Code

#include <bits/stdc++.h>

using namespace std;


int main(void)
{
 cin.sync_with_stdio(0);
 cin.tie(0);
 long long mod, p;
 
 cin >> p >> mod;
 
 long long res = 1;
 for (int i = 0; i < p-1; i++)
 {
        res = (res*3)%mod;
 }
 

 cout << (int)res << endl;
 

}

Test details

Test 1

Verdict: WRONG ANSWER

input
1 1
view   save

correct output
0
view   save

user output
1
view   save

Test 2

Verdict: ACCEPTED

input
1 97
view   save

correct output
1
view   save

user output
1
view   save

Test 3

Verdict: ACCEPTED

input
2 97
view   save

correct output
3
view   save

user output
3
view   save

Test 4

Verdict: ACCEPTED

input
3 97
view   save

correct output
9
view   save

user output
9
view   save

Test 5

Verdict: TIME LIMIT EXCEEDED

input
1000000000 151663903
view   save

correct output
82561644
view   save

user output
(no output)
view   save

Test 6

Verdict: TIME LIMIT EXCEEDED

input
143596027 174328522
view   save

correct output
28118869
view   save

user output
(no output)
view   save

Test 7

Verdict: TIME LIMIT EXCEEDED

input
147975017 915750433
view   save

correct output
463121246
view   save

user output
(no output)
view   save

Test 8

Verdict: TIME LIMIT EXCEEDED

input
135878271 839118400
view   save

correct output
539995449
view   save

user output
(no output)
view   save

Test 9

Verdict: TIME LIMIT EXCEEDED

input
298512964 952360555
view   save

correct output
580557712
view   save

user output
(no output)
view   save

Test 10

Verdict: TIME LIMIT EXCEEDED

input
529927635 923805382
view   save

correct output
726792503
view   save

user output
(no output)
view   save

Test 11

Verdict: TIME LIMIT EXCEEDED

input
318335201 844538572
view   save

correct output
543761245
view   save

user output
(no output)
view   save

Test 12

Verdict: TIME LIMIT EXCEEDED

input
424831430 113585403
view   save

correct output
11977911
view   save

user output
(no output)
view   save

Test 13

Verdict: TIME LIMIT EXCEEDED

input
365364871 255159067
view   save

correct output
164163032
view   save

user output
(no output)
view   save

Test 14

Verdict: TIME LIMIT EXCEEDED

input
953401405 641246153
view   save

correct output
32288812
view   save

user output
(no output)
view   save

Test 15

Verdict: TIME LIMIT EXCEEDED

input
937783204 624285687
view   save

correct output
213518688
view   save

user output
(no output)
view   save