49
70
23万
论坛元老
#include<bits/stdc++.h> using namespace std; int n; void primefactorize() { for(int i=2;i<=n;i++) { while(n%i==0) { cout<<i; n/=i; if(n!=1) { cout<<"*"; } } } } int main() { cin>>n; primefactorize(); return 0; }
使用道具 举报
#include<bits/stdc++.h> using namespace std; int n,t,MAXN=0; void square(int a) { for(int i=0;i<=a;i++) { for(int j=0;j<=a;j++) { for(int k=0;j<=a;j++) { if((i+j)%2==0) { if((j+k)%3==0) { if((i+j+k)%5==0) { t=i+j+k; } } } if(t>MAXN) { MAXN=t; } } } } cout<<MAXN; } int main() { cin>>n; square(n); return 0; }
#include<bits/stdc++.h> using namespace std; int a,b,c,t=0; void equation() { for(int x=0;x<10000;x++) { for(int y=0;y<10000;y++) { if(a*x+y*b==c) { t++; } } } cout<<t; } int main() { cin>>a>>b>>c; equation(); return 0; }
本版积分规则 发表回复 回帖后跳转到最后一页
Archiver|手机版|小黑屋|DiscuzX
GMT+8, 2025-2-13 01:51 , Processed in 0.053455 second(s), 28 queries .
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.. 技术支持 by 巅峰设计