米哈游笔试

2023届米哈游秋招-平台后端第1批

编程题1

image-20220807201723443

image-20220807201733980

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
char[] html = str.toCharArray();
int len = html.length;
int ans = 0, cnt = 0;
String open = "<div>", close = "</div>";
for (int i = 0; i < len; i++) {
if (html[i] == '<') {
if (len - i >= 5) {
if (str.substring(i, i+5).equals(open)) {
cnt++;
}
}
if (len - i >= 6) {
if (cnt>0 && str.substring(i, i+6).equals(close)) {
cnt--;
ans++;
}
}
}
}
System.out.println(ans);
}
}

image-20220807202825639

编程题2

image-20220807202904112

image-20220807202918549

编程题3

image-20220807203151788

image-20220807203203258

我发现我应该不适合做游戏开发,还是老老实实投Java后端吧:cry:


2023届米哈游秋招-平台后端第1批
http://example.com/2022/08/07/笔试记录/2023届米哈游秋招后端第一批/
作者
madao33
发布于
August 7, 2022
许可协议