| |
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;
}
( ) |
|