未来号编程http://oj.wlhcode.com/http://oj.wlhcode.com/
不同难度的会以3~8道题为单位,可能略过一些简单的(漏掉的会以下篇展出)
OINH系列即为 one in ninth/eighth 每次只展出总题数的九分之一 或八分之一
1001
题目描述.
将输入的华氏温度转换为摄氏温度。由华氏温度F与摄氏温度C的转换公式为:F=C*9/5+32。
输入.
输入一个实数,表示华氏温度
输出.
输出对应的摄氏温度,答案保留4位小数。
样例输入.
50
样例输出.
10.0000
#include<bits/stdc++.h>
#define quickly() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
int main(){
quickly();
double f,c;
cin>>c;
c=(f-32)*5/9;
cout<<c;
}
1002
题目描述.
给你n个整数,将其逆序输出
输入.
第一行:一个整数n。(1<=n<=100)
第二行:n个空格隔开的整数。
输出.
n个空格隔开的整数
样例输入.
3
1 7 5
样例输出.
5 7 1
#include<bits/stdc++.h>
#define quickly() ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
int main(){
quickly();
int a[101],n,m;
cin>>n;
for(int i=0;i<n;i++){
cin>>a[i];
}for(int i=n-1;i>=0;i--){
cout<<a[i]<<" ";
}
}