-
个人简介
看我主页者 拖出去 斩也 !</u>**** 汝,S子之人,今日不死也,明日必!</u>
cpp```language
#include <bits/stdc++.h> using namespace std; long long n,t; int main(){ cin>>t; while(t--){ cin>>n; for(int i=2;i<=sqrt(n);i++){ while(n%i==0){ cout<<i<<" "; n=n/i; } } if(n>1) cout<<n; cout<<endl; } return 0; } #include <bits/stdc++.h> #define f(i,j,k) for(int i=(j),i##_=(k);i<=i##_;i++) using namespace std; const int N = 6e5+6; const int mod = 100003; const long long INF = 0x3f3f3f3f; using L = long long; using UL = unsigned long long; using T = int; using B = bool; using D = double; using C = char; L n,m,ans; L power(L a,L n){ L ans=1; while(n){ if(n&1){ ans*=a; ans%=mod; } a=(a%mod)*(a%mod); n>>=1; } return ans; } int main (){ cin>>m>>n; ans=power(m,n)-(m%mod)*power(m-1,n-1)%mod; if(ans<mod) ans+=mod; cout<<ans%mod; return 0; } #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long const ll MAX=0x3f3f3f,N=1000010; ll p[N],tot; bool pp[N]; void check(){ p[0]=2; tot=0; for(int i=3;i<=1000;i+=2){ if(!pp[i]){ p[++tot]=i; for(int j=i+i;j<=1000;j+=i) pp[j]=1; } } } int main(){ check(); ll n; cin>>n; ll t=n,cnt=-1; for(int i=0;p[i]<=sqrt(t);i++){ if(t%p[i]==0){ t/=p[i]; cnt=p[i]; i--; } } if(t)cnt=t; if(cnt==n){ cout<<-1; return 0; } ll ans=MAX; for(int i=n-cnt+1;i<n;i++){ ll sum=-1,tt=i; for(int j=0;p[j]<=sqrt(tt);j++){ if(tt%p[j]==0){ tt/=p[j]; sum=p[j]; j--; } } if(tt)sum=tt; if(sum==i)continue; ans=min(ans,i-sum+1); } cout<<ans; return 0; } #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long const ll MAX=0x3f3f3f,N=1000010; ll p[N],tot; bool pp[N]; void check(){ p[0]=2; tot=0; for(int i=3;i<=1000;i+=2){ if(!pp[i]){ p[++tot]=i; for(int j=i+i;j<=1000;j+=i) pp[j]=1; } } } int main(){ check(); ll n; cin>>n; ll t=n,cnt=-1; for(int i=0;p[i]<=sqrt(t);i++){ if(t%p[i]==0){ t/=p[i]; cnt=p[i]; i--; } } if(t)cnt=t; if(cnt==n){ cout<<-1; return 0; } ll ans=MAX; for(int i=n-cnt+1;i<n;i++){ ll sum=-1,tt=i; for(int j=0;p[j]<=sqrt(tt);j++){ if(tt%p[j]==0){ tt/=p[j]; sum=p[j]; j--; } } if(tt)sum=tt; if(sum==i)continue; ans=min(ans,i-sum+1); } cout<<ans; return 0; }
-
最近活动
- 8.25普及组补题场 IOI
- csp-j 第二次普及组模拟赛-补题 作业
- 2024年8月22日CSP-J初赛模拟赛 OI
- 24年8月21日 普及组模拟赛DAY1-补题 作业
- 历年CSP初赛真题 作业
- 2024年8月16日CSP-J初赛模拟赛 OI
- 2024.8.9普及集训第七天(追光班) IOI
- 2024.8.7~8.8普及集训第五/六天(追光班) IOI
- 2024.8.6普及集训第四天(追光班) IOI
- 2024.8.5普及集训第三天(追光班) IOI
- 2024.8.4普及集训第二天(追光班) IOI
- 2024.8.3普及集训第一天(追光班) IOI
- 2024年7月26日 初赛练习(5)【小学组】-补题场 作业
- 2024年7月26日 初赛练习(5)【小学组】 OI
- 2024年7月26日 初赛练习(5)【普及组】 OI
- 2024年7月19日 初赛练习(4)【普及组】 OI
- 2024年7月12日 初赛练习(3)【普及组】 OI
- 2024年7月5日 初赛练习(2)【普及组】 OI
- 2024 六月 图灵初赛月赛 - 普及组 作业
- 2024年6⽉第三场周赛-普及组 IOI
- 2024年6月第二场周赛 普及组-补题 作业
- 2024年6月第一场周赛 普及组-补题 作业
- 2024图灵5月月赛 - 普及组 作业
- 2024 图灵五月月赛 - 普及组 ACM/ICPC
- 2024年5⽉第三场周赛补题-普及组 作业
- 2024年5⽉第三场周赛-普及组 IOI
- 2024.5.9周赛补题-普及组 作业
- 2024年5⽉第二场周赛-普及组 IOI
- 2024.5.12 市北区市赛前集中提高训练 - 小学组 OI
- 2024图灵4月月赛 - 普及组 作业
- 2024 图灵4月月赛 - 普及组 OI
- 2024.5月 第一周周赛 - 普及组 作业
- 2024.5月 第一场 周赛 - 普及组 IOI
- 2024 4月 第三场周赛 - 普及\提高组 IOI
- 2024.4 月 第二场周赛 补题场 - 普及、提高 作业
- 2024年4月第二周周赛 - 普及\提高组 IOI
- 2024.4.8 普及、提高组 四月第一周周赛 作业
- 2024 4月 第一场周赛 - 普及、提高组 IOI
- 2024.3.31 图灵三月月赛 - 普及组 补题场 作业
- 2024.3.31 图灵三月月赛 - 提高组 补题场 作业
- 2024.3.25 周赛 补题 - 普及、提高组 作业
- 2024年3⽉第三场周赛-入门/提高 IOI
- 2024.3.18 周赛补题-普及/提高 作业
- 2024年3⽉第二场周赛-入门/提高 IOI
- 2024.3.11 周赛补题-入门/提高组 作业
- 2024年3⽉第⼀场周赛-入门/提高 IOI
- 2023.3.25 青岛市图灵编程杯 周赛补题场 作业
- 2023.3.18 青岛市图灵编程杯 周赛补题场 作业
-
Stat
-
Rating