当前位置:网站首页>L1-005 考试座位号
L1-005 考试座位号
2022-04-21 21:15:00 【Yuki李师傅】
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
HashMap<String, String[]> map = new HashMap<String, String[]>();
for(int i=0;i<n;i++){
String[] line = br.readLine().split(" ");
String[] num = new String[2];
num[0] = line[0];//将准考证号、考试座位号存入num数组
num[1] = line[2];
map.put(line[1], num);//把要查询的试机座位号作为key,num作为value
}
int m = Integer.parseInt(br.readLine());//读取要查询的个数
String[] M = br.readLine().split(" ");//以空格分割存入数组
for (int i = 0; i < m; i++) {
String[] num = map.get(M[i]);//获取试机座位号作为key对应value
System.out.println(num[0] + " " + num[1]);//按格式输出
}
}
}
版权声明
本文为[Yuki李师傅]所创,转载请带上原文链接,感谢
https://blog.csdn.net/Yuki1937673679/article/details/124282582
边栏推荐
- 通道满了 继续往里面发 会如何?
- Let's take a look at this super comprehensive Android interview questions and analysis
- 【sql】SQL22 统计各个部门的工资记录数
- PlatoFarm提出永动机模型,将于4月22日在HUOBI开启IEO
- Detailed explanation of kubernetes (V) -- core object of kubernetes
- Trie (dictionary tree)
- Pretreatment problem
- String. Length () and string getBytes(). Length difference
- Future development of manufacturing industry after digital transformation
- 预处理问题
猜你喜欢
随机推荐
Principal component analysis R language implementation
滑环接线最主要的看什么
Module-3: Outsourcing student management system architecture design document
Talking about work -- Talking about data post
多租户积分系统功能清单
Pretreatment problem
工作流操作说明
【常用英文单词】
通道满了 继续往里面发 会如何?
[azure application service] after azure function enables managed identity, error appears in PowerShell function: managedidentitycredential authentication failed
Live555学习
AttributeError: ‘list‘ object has no attribute ‘endswich‘
oracle管理 | 表空间权限管控
低版本R语言ggplot2安装问题解决【rlang>=1.0.0 is require】
135、137、138、139和445端口解释及关闭方法
动态连接数据源与事务回滚
Information visualization large screen display board (with download connection)
7-3 银行业务队列简单模拟|PTA
Trie(字典树)
HMS Core 6.4.0版本发布公告









