#¾. 整数逆元

    Type: Default 1000ms 256MiB

整数逆元

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

逆元求解的一个模板

Description

给你一个数n求解1n\frac{1}{n}在模1e9+7的情况下的值

Format

Input

输入一个数n

Output

输出1n mod 1000000007\frac{1}{n} \ mod \ 1000000007

Samples

5
400000003

Limitation

n在int范围内

第七届SWPU-ACM老生预选赛

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
187
Start at
2022-9-19 14:00
End at
2022-10-28 14:00
Duration
936 hour(s)
Host
Partic.
45