#include <bits/stdc++.h>
using namespace std;
int main()
{ double x,z;
cin>>x;
if(0<=x&&x<=240)
z=x*0.4883;
if(241<=x&&x<=400)
z=0.4883*240+(x-240)*0.5383;
if(400<x)
z=0.4883*240+(400-240)*0.5383+0.7883*(x-400);
cout<<fixed<<setprecision(2)<<z;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ double z;
int x;
cin>>x;
if(0<=x&&x<=5)
z=x*2;
if(6<=x&&x<=10)
z=x*1.9;
if(11<=x&&x<=15)
z=1.8*x;
if(16<=x&&x<=20)
z=1.7*x;
if(20<x)
z=1.6*x;
cout<<fixed<<setprecision(2)<<z;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ char z,x;
cin>>z;
x=z+1;
cout<<x;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ int paishu;
char shenqing,pai;
cin>>paishu>>shenqing>>pai;
if(paishu>=10){
if(shenqing=='J')
cout<<"Z"<<endl;
else if(shenqing=='H')
cout<<"pass"<<endl;}
else if(paishu<10){
if(pai=='D')
cout<<"D"<<endl;
else if(pai=='S')
cout<<"S"<<endl;}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ float a;
cin>>a;
if(a>=0)
a=a;
else
a=-a;
cout<<fixed<<setprecision(2)<<a<<endl;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
if(n%2==0)
cout<<"even";
else
cout<<"odd";
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ int N;
cin>>N;
if(N>0)
cout<<"positive";
else
if(N==0)
cout<<"zero";
else if(N<0)
cout<<"negative";
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ int n;
cin>>n;
if(n%3==0&&n%5==0)
cout << "YES" << endl;
else cout<<"NO";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{ int b;
char a;
a=getchar();
b=a;
if(b%2==0)
cout<<"NO";
else cout<<"YES";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin>>a;
if(a%3==0&&a%5==0&&a%7==0)
cout<<"3 5 7";
else if(a%3==0&&a%5==0&&a%7!=0)
cout<<"3 5";
else if(a%3==0&&a%5!=0&&a%7==0)
cout<<"3 7";
else if(a%3!=0&&a%5==0&&a%7==0)
cout<<"5 7";
else if(a%3==0&&a%5!=0&&a%7!=0)
cout<<"3";
else if(a%3!=0&&a%5==0&&a%7!=0)
cout<<"5";
else if(a%3!=0&&a%5!=0&&a%7==0)
cout<<"7";
else if(a%3!=0&&a%5!=0&&a%7!=0)
cout<<"n";
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin>>a;
if(a==1||a==3||a==5)
cout<<"NO";
else
cout<<"YES";
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
double a;
cin>>a;
if(a/1.2<(a/3.0+50))
cout<<"Walk";
else if(a/1.2>(a/3.0+50))
cout<<"Bike";
else if(a/1.2==(a/3.0+50))
cout<<"All";
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
double N,x;
cin>>N;
x=N;
if(x>=0&&x<5)
cout<<fixed<<setprecision(3)<<-x+2.5;
else if(x>=5&&x<10)
cout<<fixed<<setprecision(3)<<2-1.5*(x-3)*(x-3);
else if(x>=10&&x<20)
cout<<fixed<<setprecision(3)<<x/2.0-1.5;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a;
char b;
cin>>a>>b;
if(a<=1000){if(a<=1000&&b=='n')
cout<<"8";
if(a<=1000&&b=='y')
cout<<"13";}
else {if(b=='n')
cout<<ceil((a-1000)/500.0)*4+8;
else if(b=='y')
cout<<ceil((a-1000)/500.0)*4+8+5;}
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c;
cin>>a>>b>>c;
if(a+b>c&&a+c>b&&b+c>a)
cout<<"yes";
else cout<<"no";
}
#include <iostream>
using namespace std;
int main()
{
int a;
cin>>a;
if(a%4==0)
{
if(a%100==0&&a%400!=0||a%3200==0)
cout<<"N";
else cout<<"Y";}
else cout<<"N";
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
char c;
cin>>a>>b>>c;
if(c!='+'&&c!='-'&&c!='*'&&c!='/')
cout<<"Invalid operator!";
else {
if(c=='+')cout<<a+b;
else if(c=='-')cout<<a-b;
else if(c=='*')cout<<a*b;
else if(c=='/'){
if(b==0)
cout<<"Divided by zero!";
else cout<<a/b;}
}
}
相关推荐
OpenJudge - NOI - 首页http://noi.openjudge.cn/