QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#515169#5. 在线 O(1) 逆元HHHashmapCompile Error//C++14167b2024-08-11 15:40:542024-11-05 22:03:05

Judging History

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

  • [2024-11-05 22:03:05]
  • 管理员手动重测本题所有提交记录
  • [2024-08-11 15:40:54]
  • 评测
  • [2024-08-11 15:40:54]
  • 提交

answer

#include <bits/stdc++.h>
#include "inv.h"
using namespace std;
int m;
void init(int p)
{
   m=p;
   return 0;
}
int inv(int x)
{
   return (m-m/x)/(m%x);
}

Details

implementer.cpp: In function ‘int main()’:
implementer.cpp:22:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   22 |         scanf("%d", &n);
      |         ~~~~~^~~~~~~~~~
answer.code: In function ‘void init(int)’:
answer.code:8:11: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
    8 |    return 0;
      |           ^