QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#676883#4867. So Easy!hasan_mahinWA 2ms3900kbC++14305b2024-10-26 02:09:412024-10-26 02:09:42

Judging History

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

  • [2024-10-26 02:09:42]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3900kb
  • [2024-10-26 02:09:41]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
int32_t main()
{
   ios_base::sync_with_stdio(0);
    cin.tie(0);
   int a , b , n , m;
   while(cin >> a >> b >> n >> m)
   {
   	  int s = sqrt(b);
   	  int ans = (a + b);
   	  int ans1 = pow(ans , n);

   	  cout << ans1  % m<< '\n';
   }
}

详细

Test #1:

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

input:

2 3 1 2012
2 3 2 2012
2 2 1 2012
31603 998691525 860250282 20381
4062 16491843 2741468 17921
26061 679145378 8235021 22991
16225 263237214 865378598 7182
18902 357253267 137732528 3407
25414 645847050 674769818 7114
6903 47648125 254957745 1556
16577 274779382 158233677 1099
939 880815 990631973 610...

output:

5
25
4
-19202
-10218
-9293
-1010
-443
-1810
-1368
-282
-5205
-9248
-1549
-968
-6272
-27344
-6368
-7538
-512
-3511
-2264
-13466
-7968
-12348
-11960
-968
-6274
-6830
-14156
-4652
-1220
-947
-4180
-14072
-395
-2
-3064
-10368
-10458
-5934
-9814
-3009
-6390
-4466
-328
-11911
-27753
-1408
-56
-31442
-1348...

result:

wrong answer 1st lines differ - expected: '4', found: '5'