首页 > 小红的好排列
头像 牛客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 展开全文

等你来战

查看全部