最近の記事

科学英語#3

A finite speed of light means that whatever we see is a message from the past. 有限の光速は、我々が見るものが過去からの伝言であることを意味します。 タイムラグがあるってことですね。 Nature prevents us from enjoying the present. 無生物主語ですね。主語を副詞的に訳す。 自然のせいで、我々は現在の事柄を楽しむことができない。

    • 科学英語#2

      Light was already known in ancient Greece, from a simple daily phenomenon, the shadow. fromに注意します。 光は、簡単な日常の現象である影と区別するものとして、古代ギリシャで既に知られていました。 そうなんですね。 We know light from the shadow. 我々は、光と影を区別する。 区別するという部分が重要ですね。 Physics would have

      • 科学英語#1

        This book is written for anybody who is curious about nature and motion. motionが訳しづらい?かもしれないですね。 この本は、自然と運動に興味があるすべての人に向けて書かれています。 そうでもないか。 本書の対象読者は、自然と運動に興味があるすべての人です。 こんなかんじですかね? Curiosity about how people, animals, things, images a

        • 189. Rotate Array / LeetCode

          Description Submissionclass Solution: def rotate(self, nums: List[int], k: int) -> None: length = len(nums) rotated = [0] * length for index in range(length): rotated[(index + k) % length] = nums[index] for index in range(length):

        科学英語#3

          AtCoder ABC 143 D - Triangles

          問題N 本の棒があって、個別の長さをもっている。 選んだ3 本で三角形が作れる方法は何通りあるか? 方針a <= b <= c c < a + b の条件で a, bは固定して、c の範囲を求める。 bisect_leftを使えばc の可動範囲の最大値が求まる。 import bisect# 入力def read_data(): N_ = int(input()) L_ = list(map(int, input().split())) retur

          AtCoder ABC 143 D - Triangles