Skip to content

modint の .val() の帰り値が int でなく unsigned int で帰ってくる #177

Open
@PCTprobability

Description

@PCTprobability

.val() の帰り値が int ではなく unsigned int で帰ってきていそうな挙動を示します。

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using mint2 = modint1000000007;
int main(){
  mint a = 1;
  mint2 b = 2;
  cout << a.val() - b.val() << endl;
}

上記のコードが atcoder のコードテスト環境で 4294967295 を返しました。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions