点击这里更换您喜欢的皮肤wtboj 首页
请点击这里登入noios   首页 入门 c++讲义 入门教程视频 金牌教程 入门视频 站务 公告 | 题库 记录 竞测 测试 闯关 作业 排名 团队 讨论 | 换肤 | 登入 注册  
News >>   新增功能:各团队管理员可以发布本团队作业了 ()

From sina007
位置号
讨论 Discussion
 
空格

























































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































































( )

#include<bits/stdc++.h>
using namespace std;
int main(){
 freopen("p1460.in","r",stdin);
 freopen("p1460.out","w",stdout);
int n,i,a,b,c;
cin>>n;
a=n%10;
b=n/10%10;
c=n/100;
if(a*a*a+b*b*b+c*c*c==n)cout<<"yes";
else cout<<"no";
 fclose(stdin);
 fclose(stdout);
return 0;
}
( )
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("p1051.in","r",stdin);
freopen("p1051.out","w",stdout);
int n,m,a[1001]={0},k=1,c[1001]={0};
bool b=false;
cin>>n>>m;
for(int i=1;i<=n;i++){
cin>>a[i];
if(a[i]>m)k++;
}
cout<<k;
fclose(stdin);
fclose(stdout);
return 0;
}
( )
#include<bits/stdc++.h>
using namespace std;
int n;
int a[100];
int l=0;
void f(int s,int t) {
  if(s==n){
    for (int i=0;i<l;++i) {
      if (i>0) {
        cout << "+";
      }
      cout << a[i];
    }
    cout << endl;
    return;
  }
  for (int i =t;s+i<=n;++i) {
    a[l++]=i;
    f(s+i, i);
    l--;
  }
}
int main() {
  cin >> n;
  f(0, 1);
  return 0;
}
( )
#include<bits/stdc++.h>
using namespace std;
bool f(int m) {
  if (m<2) return false;
  for (int i = 2; i <= sqrt(m); ++i) {
    if (m % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
 freopen("p1049.in","r",stdin);
 freopen("p1049.out","w",stdout);
  int n;
  cin>>n;
  int count=0;  
  int num=2;
  while (true) {
    if (f(num)) {
      count++;
      if (count == n) {
        cout <<num;
        break;
      }
    }
    num++;
  }
 fclose(stdin);
 fclose(stdout);
  return 0;
}
( )
发布讨论主题 回复讨论主题
Flag
  
题号
  P1608
  其它
通过
  35人
提交
  91次
通过率
  38%
难度
  0
提交 讨论 题解
 Copyright wtboj © 2005-2006. www.wutuobang.date Powered by wtboj 关于 联系 帮助
 wtboj Information ---- Total Users : 1361 | Online Users / Processes : 0 / 180 | Processed Time : 316 ms | Server Time : 2025/12/16 10:58:20