回答編集履歴

1

.

2024/07/12 05:47

投稿

int32_t
int32_t

スコア21461

test CHANGED
@@ -1,5 +1,6 @@
1
1
  ```python
2
2
  def longest_string(moji_list):
3
+ first=moji_list[0]
3
4
  ```
4
5
  エラーが起きているのは `moji_list` の要素数が0のときですが、`moji_list`の要素数が1のときにそれ以上再帰しないよう工夫するのがよいでしょう。
5
6