import java.util.Scanner; public class code1 { public static void main(String[] args){ Scanner in = new Scanner(System.in); System.out.println("请输入你的名次:"); int num=in.nextInt(); switch(num){ case 1: System.out.println("金牌"); break; case 2: System.out.println("银牌"); break; case 3: System.out.println("铜牌"); break; default : System.out.println("没奖牌"); } } }