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

讨论 Discussion
 
333
#include<iostream>
using namespace std;
int main()
{
freopen("p1032.in","r",stdin);
freopen("p1032.out","w",stdout);
int a;
cin>>a;
if((a%100!=0)&&(a%4==0)||(a%400==0))
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
fclose(stdin);
fclose(stdout);
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("p1045.in","r",stdin);
freopen("p1045.out","w",stdout);
int n,i,j,k,s,t;
cin>>n;
i=1;
s=1;
k=1;
t=1;
while( i<n) {
i=i+1;
t=t+1;
if( t>k){  
k=k+1;
t=1;
s=s+2;
}
}
cout<<s;
fclose(stdin);
fclose(stdout);
}
( 2026/7/1 17:54:27 )

小贴士
2题
( )
111
#include <bits/stdc++.h>
using namespace std;
int main() {
freopen("p1614.in","r",stdin);
freopen("p1614.out","w",stdout);
string s;
cin >> s;
sort(s.begin(), s.end(), greater<char>());
cout << s;
fclose(stdin);
fclose(stdout);
return 0;
}
( )
4
#include <iostream>
using namespace std;
int main() {
freopen("p1287.in","r",stdin);
freopen("p1287.out","w",stdout);
long long n;
cin >> n;
cout << n;
while (n >= 10) {
long long p = 1;
long long t = n;
while (t > 0) {
p *= (t % 10);
t /= 10;
}
n = p;
cout << " " << n;
}
fclose(stdin);
fclose(stdout);
return 0;
}
( )
发布讨论主题 回复讨论主题
 Copyright wtboj © 2005-2006. www.wutuobang.date Powered by wtboj 关于 联系 帮助
 wtboj Information ---- Total Users : 1390 | Online Users / Processes : 0 / 119 | Processed Time : 39 ms | Server Time : 2026/9/10 11:15:47