題目?jī)?nèi)容:
無(wú)線電臺(tái)的RS制信號(hào)報(bào)告是由三兩個(gè)部分組成的:
R(Readability) 信號(hào)可辨度即清晰度.
S(Strength) 信號(hào)強(qiáng)度即大小.
其中R位于報(bào)告第一位,共分5級(jí),用1—5數(shù)字表示.
1---Unreadable
2---Barely readable, occasional words distinguishable
3---Readable with considerable difficulty
4---Readable with practically no difficulty
5---Perfectly readable
報(bào)告第二位是S,共分九個(gè)級(jí)別,用1—9中的一位數(shù)字表示
1---Faint signals, barely perceptible
2---Very weak signals
3---Weak signals
4---Fair signals
5---Fairly good signals
6---Good signals
7---Moderately strong signals
8---Strong signals
9---Extremely strong signals
現(xiàn)在,你的程序要讀入一個(gè)信號(hào)報(bào)告的數(shù)字,然后輸出對(duì)應(yīng)的含義。如讀到59,則輸出:
Extremely strong signals, perfectly readable.
輸入格式:
一個(gè)整數(shù),信號(hào)報(bào)告。整數(shù)的十位部分表示可辨度,個(gè)位部分表示強(qiáng)度。輸入的整數(shù)范圍是[11,59]內(nèi)有效的數(shù)字,這個(gè)范圍外的數(shù)字不可能出現(xiàn)在測(cè)試數(shù)據(jù)中。
輸出格式:
一句話,表示這個(gè)信號(hào)報(bào)告的意義。按照題目中的文字,先輸出表示強(qiáng)度的文字,跟上逗號(hào)和空格,然后是表示可辨度的文字,跟上句號(hào)。注意可辨度的句子的第一個(gè)字母是小寫(xiě)的。注意這里的標(biāo)點(diǎn)符號(hào)都是英文的。
輸入樣例:
33
輸出樣例:
Weak signals, readable with considerable difficulty.
時(shí)間限制:500ms內(nèi)存限制:32000kb
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
int number=in.nextInt();
String[]R= {"unreadable","barely readable, occasional words distinguishable","readable with considerable difficulty","readable with practically no difficulty","perfectly readable"};
String[]S= {"Faint signals, barely perceptible","Very weak signals","Weak signals","Fair signals","Fairly good signals","Good signals","Moderately strong signals","Strong signals","Extremely strong signals"};
int RNumber=number/10-1;
int SNumber=number%10-1;
System.out.println(S[SNumber]+", "+R[RNumber]+".");
in.close();
}
}