玄关

灌水区

TeaQiLang @ 2024-11-29 22:26:58

++n[min(a,b)]什么意思


by Misty_Post @ 2024-11-29 22:28:45

对于n数组的第min(a,b)项自增1


by Misty_Post @ 2024-11-29 22:28:56

@TeaQiLang


by TeaQiLang @ 2024-11-29 22:29:25

@Misty_Post 已关


by csxx601cjy @ 2024-11-29 22:30:16

@TeaQiLang

准确来说不是第min(a,b)项,而是第min(a,b)+1项


by Controls_Wishes @ 2024-11-29 22:36:58

就是 min(a,b) 项吧


by csxx601cjy @ 2024-11-29 22:38:36

@Controls_Wishes

数组下标是从0开始的,例如a[0]是a的第1项


by Controls_Wishes @ 2024-11-29 22:46:35

@csxx601cjy ...


by Controls_Wishes @ 2024-11-29 22:47:38

你这样理解没错,但口头上一般会认为 a[1] 就是第一项吧


|