import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
int UTC;
Scanner in = new Scanner(System.in);
int BJT = in.nextInt();
if (BJT >= 0 && BJT <= 799) {
UTC = BJT + 1600;
System.out.println(UTC);
} else if (BJT >= 800 && BJT <= 2359) {
UTC = BJT - 800;
System.out.println(UTC);
} else {
System.out.println("输入时间有误");
}
in.close();
}
}
133
时间限制:500ms内存限制:32000kb
1---Unreadable
2---Barely readable, occasional words distinguishable
3---Readable with considerable difficulty
4---Readable with practically no difficulty
5---Perfectly readable
报告第二位是S,共分九个级别,用1—9中的一位数字表示输出样例:
Weak signals, readable with considerable difficulty.
时间限制:500ms内存限制:32000kb
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
int RS = in.nextInt();
int R ,S;
if (RS >= 11 && RS <= 59) {
S = RS % 10;
R = RS / 10;
switch (S) {
case 1 :System.out.print("Faint signals, barely perceptible");
break;
case 2 :System.out.print("Very weak signals");
break;
case 3 :System.out.print("Weak signals");
break;
case 4 :System.out.print("Fair signals");
break;
case 5 :System.out.print("Fairly good signals");
break;
case 6 :System.out.print("Good signals");
break;
case 7 :System.out.print("Moderately strong signals");
break;
case 8 :System.out.print("Strong signals");
break;
case 9 :System.out.print("Extremely strong signals");
break;
default :System.out.print("Error");
break;
}
System.out.print(",");
switch (R) {
case 1 :System.out.print(" unreadable");
break;
case 2 :System.out.print(" barely readable, occasional words distinguishable");
break;
case 3 :System.out.print(" readable with considerable difficulty");
break;
case 4 :System.out.print(" readable with practically no difficulty");
break;
case 5 :System.out.print(" perfectly readable");
break;
default :System.out.print("Error");
break;
}
System.out.println(".");
}else {
System.out.println("请输入正确的信号强度");
}
in.close();
}
}