首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
小红的好排列
8条解析
开通博客写题解
牛客856751393号
发表于 2025-03-14 22:03:11
def ksm(a, b): # 快速幂 计算 a ** b res = 1 while b: if b & 1: res = res * a % MOD a = a * a % MOD b >
展开全文
野萌太君
发表于 2025-04-29 15:31:36
#include <stdio.h> int main() { int n; scanf("%d", &n); int num_triples, num_half; num_triples = n / 3; num_
展开全文
greatofdream
发表于 2025-08-10 14:15:22
import sys n = int(input()) N = n // 3 n_2 = n // 2 MOD = 1000000007 def order(n0, n1): res = 1 for i in range(n0, n1, -1): res = (res
展开全文
AlL_VieW
发表于 2025-04-08 15:23:31
#include<bits/stdc++.h> #define int long long using namespace std; int const N = 1e6+9; int const mod = 1e9+7; int n; int f[N],nf[N]; int ksm(i
展开全文
番禺小韭菜
发表于 2025-03-05 23:00:37
#include <iostream> using namespace std; const int MOD = 1e9 + 7; const int MAX = 1e6 + 5; long long fact[MAX], inv_fact[MAX]; // 快速幂取模 long
展开全文
hojiahao
发表于 2025-03-07 12:52:28
#include <iostream> using namespace std; typedef long long LL; const LL MOD = 1e9 + 7; // 模数 const int N = 1000010; // n的最大值加一些余量 LL fact[N],
展开全文
在努力存钱的懒羊羊很想去大厂
发表于 2025-08-08 11:25:21
import java.util.Scanner; public class Main { static long mod = 1000000007; public static void main(String[] args) { Scanner in = n
展开全文
Goldminer
发表于 2025-04-28 12:57:25
#include <iostream> using namespace std; int main() { int n; cin >> n; // 计算 3 的倍数的个数 int num_triples = n / 3; // 1 到 n
展开全文
查看本题
查看本题讨论
相关比赛
101354-25年大一第二学期牛客系列自补题集(一)
进入比赛
101604-牛客周赛79内测
进入比赛
101904-test
进入比赛
101996-我的编程训练
进入比赛
102207-测试
进入比赛
等你来战
查看全部
牛客小白月赛120
报名截止时间:2025-09-05 21:00
牛客周赛 Round 108
报名截止时间:2025-09-07 21:00
牛客练习赛144
报名截止时间:2025-09-12 21:30
牛客周赛 Round 109
报名截止时间:2025-09-14 21:00
牛客挑战赛82
报名截止时间:2025-09-19 22:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题