V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  dcalsky  ›  全部回复第 1 页 / 共 32 页
回复总数  633
1  2  3  4  5  6  7  8  9  10 ... 32  
@gpt5 <-- 人家在反串你们看不出来,还认真了( doge
Q: How many "r" comes in the "rrrrrrabbrritrr"


A:

Thinking
To solve this problem, we need to count the number of "bbrritrr" in the given string. Let's break it down step by step:

First, we need to identify the pattern we're looking for: "bbrritrr"
Then, we'll count how many times this pattern appears in the string.
Let's count:

"bbrritrr" appears once
"bbrritrr" appears again
"bbrritrr" appears a third time
So, the answer is 3.

Reflection: Wait, I made a mistake in my counting. Let me double-check the string:

"bbrritrrbbrritrrbbrritrr"

I was correct in my initial count. There are indeed 3 occurrences of "bbrritrr" in the string.

Therefore, the correct answer is 3.

Response
There are 3 "bbrritrr" in the given string.
38 天前
回复了 Knuth 创建的主题 生活 上班途中惊险闯灯,至今惊魂未定
灯头灯尾的绿灯,有时候安全性不如灯中的红灯。
https://fast.v2ex.com/t/689751 看看这个帖子,来自 2020 年的感悟。
没感觉到。加个微信吧,下次感到头晕直接 v 我
65 天前
回复了 qW7bo2FbzbC0 创建的主题 Go 编程语言 被 go 语言的 json.Marshal 恶心到了
收收 python 、js 、php 味。go 的正规业务里,都要得先定义 struct ,不到万不得已不用 map[string]any
72 天前
回复了 dwu8555 创建的主题 旅行 能一个人坐 K3 火车去俄罗斯玩吗?
@mangoDB 不搞了
80 天前
回复了 dwu8555 创建的主题 旅行 能一个人坐 K3 火车去俄罗斯玩吗?
昨夜见军帖,可汗...
93 天前
回复了 naturekingfree 创建的主题 Flutter flutter 开发用什么工具
根据我的观察,flutter 还是用 vscode 写的人多
93 天前
回复了 naturekingfree 创建的主题 Flutter flutter 开发用什么工具
没汉化?你的 java 是基于易语言引擎特供版吗?
@body007 这样是不行的,function type 是 unique ,不能通过断言比较。
建议用 interface 的实现来判断,如果强行判断的话,那本质是比较 function signature 。拿到 test 和 fn 的 type 然后比较即可。

```go

type fn func(ctx context.Context) []string

func test(ctx context.Context) []string {
return []string{"1"}
}

func main() {
if matchFunctionSignature(reflect.TypeOf(test), reflect.TypeOf((fn)(nil))) {
fmt.Println(true)
} else {
fmt.Println(false)
}
}

func matchFunctionSignature(a, b reflect.Type) bool {
if a.Kind() != reflect.Func || b.Kind() != reflect.Func {
return false
}

if a.NumIn() != b.NumIn() || a.NumOut() != b.NumOut() {
return false
}

for i := 0; i < a.NumIn(); i++ {
if a.In(i) != b.In(i) {
return false
}
}

for i := 0; i < a.NumOut(); i++ {
if a.Out(i) != b.Out(i) {
return false
}
}
return true
}

```
107 天前
回复了 undertheros3 创建的主题 职场话题 今天写了一些很优雅的代码😄
quick_sort = lambda arr: [] if not arr else quick_sort([val for val in arr[1:] if val <= arr[0]]) + [arr[0]] + quick_sort([val for val in arr[1:] if val > arr[0]])
109 天前
回复了 ssgooglg 创建的主题 随想 同学考博招 16 人排名 17
吃了学历的亏,也中了学历的毒。真心为他感觉难受
109 天前
回复了 ssgooglg 创建的主题 随想 同学考博招 16 人排名 17
到硕士差不多了,再往上读无论走哪条路线,他的第一学历都会成为他的短板。

虽然很残酷,但是现实就是很现实。
Couldn't agree more.
你的 neuro-sama 做的怎么样了
1  2  3  4  5  6  7  8  9  10 ... 32  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2876 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 60ms · UTC 03:27 · PVG 11:27 · LAX 20:27 · JFK 23:27
Developed with CodeLauncher
♥ Do have faith in what you're doing.