首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
yauqq
2026年2月5日 14:37
求S(n) 题解:
P1500
回复 0
|
赞 0
|
浏览 86
#include<bits/stdc++.h> using namespace std; int main(){ long long n; while(cin>>n){ cout<<n%3<<endl; } return 0; }
mlx
2026年1月31日 12:10
求S(n) 题解:
P1500
回复 0
|
赞 1
|
浏览 147
#include<iostream> using namespace std; typedef unsigned long long ull; ull kmi(ull a,ull b,ull mod) { ull res=1%mod; while(b) { if(b&1) res=(res*a)%mod; a=(a*a)%mod; b>>=1; } return res; } int main() { ull n; while(cin>>n) { co...
xsw
2026年1月31日 09:18
求S(n) 题解:
P1500
回复 0
|
赞 1
|
浏览 123
#include<iostream> using namespace std; typedef long long LL; int qmi(int a, int b, int p) { int res = 1 % p; while (b) { if (b & 1) res = (LL) res * a % p; a = (LL) a * a % p; b >>= 1; } return res; } int main() { int x; while (cin >> ...
奶龙大王
2026年1月25日 14:49
求S(n) 题解:
P1500
回复 0
|
赞 2
|
浏览 182
FMOD与POW函数 #include <iostream> #include <cmath> // 必须包含 cmath using namespace std; int main() { long long n; while(cin>>n){ n=n%3; double temp=fmod(pow(n,5...
曾不会
2026年1月25日 09:11
求S(n) 题解:
P1500
回复 0
|
赞 1
|
浏览 158
#include<stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF) { int t=n%3; int s=t*t; s=s...
无名1
2025年6月23日 14:22
求S(n) 题解:费马小定理
P1500
回复 0
|
赞 18
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; int main(){ long long n; while(cin>>n){ cout<<n%3<<endl; } return 0; }
leo110
2025年5月14日 16:00
求S(n) 题解:二项展开(3a+b)的5次幂对3的余=b的5次幂%3
P1500
回复 0
|
赞 6
|
浏览 906
#include<iostream> #include<cmath> using namespace std; typedef long long ll; int main(){ ll n; while(cin>>n){ int a=n%3; a=pow(a,5);  ...
阿灿
2025年3月25日 10:12
求S(n) 题解:
P1500
回复 0
|
赞 8
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; int main(){ long long int n; while(cin>>n){ cout<<(n%3)*(n%3)*(n%3)%3<<endl; } return 0; }
西电机试专家
2025年2月11日 11:32
求S(n) 题解:笨蛋小美的做法
P1500
回复 0
|
赞 27
|
浏览 1.6k
#include <bits/stdc++.h> using namespace std; int main(){ int n; while(cin>>n){ int ans=1; for(int i=0;i<5;i++){ &nbs...
可可爱爱草莓派
2024年9月1日 17:45
求S(n) 题解:
P1500
回复 0
|
赞 9
|
浏览 2.7k
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin >> n){ cout << (int(pow(n%3,5)) % 5) << endl; } }
1
2
3
题目
求S(n)
题解数量
24
发布题解
在线答疑
热门题解
1
求S(n) 题解:笨蛋小美的做法
2
求S(n) 题解:费马小定理
3
求S(n) 题解:C
4
求S(n) 题解:
5
求S(n) 题解:
6
求S(n) (同余定理)题解:
7
求S(n) 题解:longlongint防止溢出
8
求S(n) 题解:二项展开(3a+b)的5次幂对3的余=b的5次幂%3
9
求S(n) 题解:C++实现
10
求S(n) 题解:C