漢字王はプログラミングも漢字で書いてある方が読みやすい説

QuizKnock
Furigana above words
Word spacingAdjust the gap between Japanese words (0–10)5
Subtitle size
Unseen 583Looked up 0Learning 0Mastered 0

クイズのサン。Quiz's san.

おお、マイナスサンじゃん。マイナスサン。Oh, it's minus three. Minus three.

こんにちはクイズノックの須貝すがいです。Hello, this is Sugai from QuizKnock.

やしこです。I'm Yashiko.

山本やまもとです。I'm Yamamoto.

漢文かんぶんっぽいプログラミング言語げんご初見しょけんで理解りかいできるのか。Can you understand a classical Chinese-style programming language at first sight?

まずこちらご覧らんください。First, please look at this.

じゃあ。あ、Well. Ah,

漢文かんぶんだ。It's classical Chinese.

こちらですね。It's this.

漢文かんぶん風ふうのプログラミング言語げんごウェンヤンというあるの本ほんのウェンヤン。ウェンヤン。Here it is.

プログラミングの初心者しょしんしゃが最初さいしょに書かくコードといえば何なにかわかりますか。ハローワールド。Speaking of the first code a programming beginner writes, do you know what it is? Hello World.

ですよね。Right.

おお。Oh.

はい。Yes.

これはね、ウェンヤンの場合ばあいがハローワールドこんな感かんじになっております。In the case of Wenyan, Hello World looks like this.

で、コードを説明せつめいすると、モジュールつこのモンテンチコダイコテン数かずコに代入だいにゅうしてください。To explain the code, please assign to the variable ko this muntencikodaikoten number ko.

な、これ今いまコ。This is now ko.

はい。Yes.

どういうことか。What does that mean.

で、そのコを出力しゅつりょくしてください。And please output that ko.

とすると、まあこのモジュールつモンテンチコダイマルが出でると。Then, well, this module tsu montencikodaimaru will appear.

なるほどね。I see.

本日ほんじつはこのウェンヤンのコードを見みて何なにが出力しゅつりょくされるのか当あてるというクイズになっておりますね。Today's quiz is to look at this Wenyan code and guess what will be output.

なるほど。I see.

協力きょうりょくで。With cooperation.

でございます。あ、It is. Ah,

協力きょうりょくですね。It's cooperation.

で、今回こんかい問題もんだいで出題しゅつだいされるのはすべて数列すうれつになっています。And all the questions this time are number sequences.

答こたえは並ならびやすいって答こたえ言いって大丈夫だいじょうぶです。The answer is easy to line up, it's okay to say the answer.

3人さんにんで協力きょうりょくして5問もんクリアを目指めざすと。The three of us will work together to aim to clear 5 questions.

はい。Yes.

第一だいいち問もんはこちらです。Here is the first question.

なるほど。I see.

あれ、一いち数すう、数かずだねあれ。Huh, one suu, it's suu, huh.

数字すうじの数かずじゃない。Not the number suuji's suu.

役やくみたいなですか。Is it like a role?

数すうの旧字体きゅうじたい。The old form of the character for number.

数すうですか。Is it suu?

旧字体きゅうじたいですね。It's the old character form.

一ひとつの数かずあり。There is one suu.

一いちがあるんだ。There is a one.

でこれをコウと名なづける。And name this Kou.

次つぎにまたあれある一ひとつの数すう。違くNext again there is one suu. No,

二に。Two.

これをオツと名なづける。はいはいName this Otsu. Yes yes

はい。コウYes. Kou

という名前なまえの一いちとオツという名前なまえの二にがあります。There is a one named Kou and a two named Otsu.

はい今いま。Yes now.

はい。Yes.

出だす。Output it.

これ10遍ぺん。10This 10 times. 10

回かい繰くり返かえすよってことかな。Does it mean repeat this 10 times?

オツを以もってコウを乗じょうず。Multiply Kou by Otsu.

これが乗算じょうざんなのか、累乗るいじょうなのかわかんないですけど。I'm not sure if this is multiplication or exponentiation.

でまたあでこの乗じょうじたやつをヘイと名なづけます。And then name this multiplied result Hei.

若もしこのコウというもの有ありきり。If there is this thing called Kou.

プログラミングに実践じっせん出でてきないってことないけど。It's not that it never comes up in actual programming, but.

一旦いったん前半ぜんはん処理しょりする。はいはい。Let's process the first half for now. Yes, yes.

単純たんじゅん前半ぜんはん処理しょりしよう。Let's simply process the first half.

乗じょうというものが掛かけ算ざんだと仮定かていすると、はい。Assuming that 'multiply' means multiplication, yes.

まず乙おつを以もって甲こうを乗じょうず。First, multiply Kou by Otsu.

つまり2を以もって1を掛かける。That is, multiply 1 by 2.

はい。Yes.

掛かけて2がやること。はいはいMultiplying gives 2. Yes, yes.

はい。Yes.

でこれを10回かい繰くり返かえそうとするとね、プログラミングでいうところfor文ぶんってやつですか?And to repeat this 10 times, in programming terms is that like a for loop?

同おなじ処理しょりを10回かいとかまあ何回なんかい繰くり返かえしますよみたいな。Like repeating the same process 10 times or however many times.

昔むかしの甲こうが丙へいに入はいってみたいな。Like putting the old Kou into Hei or something.

ああ、なるほどそういうこと?Ah, I see, is that what it means?

代入だいにゅうするんだと思おもうんですよね。I think it's assigning it.

そうかそうかそうかそうか。I see, I see, I see, I see.

1回いっかいの処理内容しょりないようは乗じょうずから云云うんぬんまでがこう繰くり返かえしの範囲内はんいないを指さしてるんですか。Does the content of one iteration, from 'multiply' to 'etcetera', indicate the range of the repetition?

云云うんぬんまでを10回かい繰くり返かえしてこうを掛かけるということ。Repeat everything up to 'etcetera' 10 times to multiply Kou.

おお、云云うんぬんいいですね。Oh, 'etcetera' is nice.

云云うんぬん。'Etcetera'.

云云うんぬん終おわりを意味いみしてるかな。I wonder if 'etcetera' means the end.

云云うんぬん終おわりを意味いみしてるかもね。Maybe 'etcetera' means the end.

ね。Right.

その括弧かっことかでどこまでが1回いっかいの処理しょりなのか。2Like parentheses showing where one iteration ends. 2

に1入いれる。2Put 1 into 2. 2

に2入いれる。1Put 2 into 1.

かけ2。Times 2.

を行おこなう。Perform it.

丙へいとする。Call it Hei.

甲こうに丙へいを入いれる。Put Hei into Kou.

なるほど。I see.

そうすると答こたえに乙おつを掛かければよね。Then you just multiply the answer by Otsu.

甲こうに乙おつ掛かけるみたいなことだよね。It's like multiplying Kou by Otsu.

乙おつは二にだから数字すうじ増ふえてくでいいね。Otsu is two, so the number keeps growing, good.

オッケー。Okay.

そうだね。That's right.

二にの十じゅう乗じょう。Two to the tenth power.

二にの十じゅう乗じょう。Two to the tenth power.

基本的きほんてきな文法ぶんぽうの話はなしで今いま初はじめて気きづいたのは、最初さいしょにあの変数へんすうの型かたを宣言せんげんしてたんだなということに今いま気きづきました。Speaking of basic grammar, what I just realized for the first time is that it was declaring the variable type at the beginning.

さっきはなんか文言もんごんって言いったからテキストしか入いれられなかったけど、今回こんかい数字すうじが入いれられるってこと。Earlier it said 'text', so only text could be entered, but this time numbers can be entered.

なるほどね。I see.

この言語げんごにもちゃんと型かた宣言せんげんがあるんですね。This language has proper type declarations too.

答こたえはどうぞ。Go ahead with the answer.

千せん二十にじゅう四よん。One thousand twenty-four.

正解せいかい。Correct.

わかりやすいようにインデントを付つけたものがこちらになります。Here is the same thing with indentation added to make it easier to understand.

ああ、インデント。Ah, indentation.

おお。Oh.

わかりやすい。Easy to understand.

わかりやすい。Easy to understand.

最初さいしょからこうしてよ。You should have done this from the start.

もう一回いっかいこれでございます。あ、Once more, here it is. Ah,

できますね。You can do it.

できます、できますね。You can, you can do it.

安全あんぜんでできちゃってるじゃないですか。You've already done it safely.

安全あんぜんでできます。It can be done safely.

これね、ツイッテブックメモに立たてていただいて。Please post this in the Tweetbook memo.

安全あんぜん。Safe.

まあアンコンパイル。Well, uncompile it.

俺おれらがコンパイラじゃ。We are the compiler.

俺おれは人間にんげんコンパイラ。I'm a human compiler.

二に問もん目めはこちら。Here is the second question.

えーええ。Uh...

なんだなんだ。What, what?

あれ、カスで見みた。Huh, I've seen that in C.

三角さんかくの所ところ。The triangle part.

なんだ?What is it?

関数かんすうや。It's a function.

プログラミングどこいった?Where did the programming go?

安定あんていの所ところですね。It's the stable part.

ライブラリみたいな。Like a library.

ライブラリ。Library.

これじゃない?Isn't it this?

ライブラリ。Library.

最初さいしょにスイングしてる。It's swinging at first.

これなんだよネタバレ。This is a spoiler.

三角さんかくっていうライブラリから関数かんすう持もってくるやつ。The one that brings a function from a library called triangle.

これなんだよネタバレ。This is a spoiler.

で、方ほうべきの字じ。And, the character for power.

漢文かんぶんだと一個いっこ目め冪べき字じでまさにべきの義ぎを悟さとっただIn classical Chinese, with the first character 'power', I grasped exactly the meaning of power

とすごい三角さんかくの定じょうを見みたらべきの定義ていぎを理解りかいしたんじゃないでしょ。Like, after seeing the definition of triangle, didn't you understand the definition of power.

まあそういうことは。あ、Well, something like that. Ah,

でここからまさっき見みられたですね。And from here, as you saw earlier.

はい、数すうがありますよ。Yes, there is a number.

はい、え、それは二にですよ。Yes, uh, that is two.

二にある。There's a two.

これを甲こうと名付なづけます。We'll name this Kou.

はい、でまた数かずがあります。Yes, and there's another number.

して、はい、うわ、負ふの三さん。お、And, yes, wow, negative three. Oh,

マイナス三さんじゃん。It's minus three.

これ半分はんぶん過すぎておうって何なに言いって。This is past halfway, what are you saying.

これは乙おつと名付なづけますよ。We'll name this Otsu.

はい、うわやばいやばい。ここYes, wow this is bad bad. Here

甲こう置おいて乙おつ置おいて、これどっちがどっちをべきするんだろうな。Putting Kou and putting Otsu, I wonder which raises the other to a power.

うわどうかな。Oh, I wonder how it'll go.

一旦いったん続つづけます。はいはい、Let's keep going for now. Yes, yes,

甲こうに乙おつ持もって乙おつ引ひく。Take B from A and subtract B.

乙おつの引ひきですね。It's the pulling of B.

引ひく乙おつだ。It's the pulling B.

引ひき引ひく乙おつですね。It's pull, pull B.

でそれを丁ちょうと名付なづけます。And name that D.

はい、で丁ひのとを出力しゅつりょくしなさいと。はいはいはいはい。Yes, and output D. Yes yes yes yes.

八はちだ八やか二にのマイナス三乗さんじょう引ひく。Eight, eight minus 2 to the power of minus 3.

マイナス三さんかマイナス三さんを引ひくマイナス三さんどっちかどっちかだね。Minus 3, subtract minus 3, it's one or the other.

どっちかだとべきの書かき方かたってさ、こうこういう書かき方かたまずあるじゃないですか。Either way, for how to write powers, well, there's this way of writing, right.

今いま多分たぶんこうこうじゃなくてこういうこういうRight now it's probably not like this, but like this, this

下側したがわの書かき方かたみたいなのがされている気きがして、何なんかを何なにかしなさいみたいな書かき方かただなと思おもったとき、今いまの文ぶん順じゅんだと甲こうが二に、乙おつがマイナスI feel like it's written in the lower style, and when I thought it's phrased like do something to something, with the current sentence order, A is 2, B is minus

三さん、二にのマイナス三乗さんじょういいですか、八分はちぶの一いち。Three, 2 to the power of minus 3, okay, one-eighth.

そうしましょう。Let's do that.

八はちは零点れいてん一二いちに五ご、零点れいてん一二いちに五ご引ひくマイナス三さんじゃEight is 0.125, 0.125 minus negative 3, so

三さん点てん一二いちに五ご。3.125.

べきやな、べきやな。It's a power, it's a power.

答こたえはどうだ、三さん点てん一二いちに五ご。So how about the answer, 3.125.

正解せいかい。Correct.

参入さんにゅう一部いちぶ二輪にりん五ご門もんということで、So, entering, part one, two wheels, five gates,

小数しょうすう出でても不安ふあんにならない心こころを鍛きたえてきてるんです。We've been training our minds not to panic even when decimals appear.

東ひがし大だい受験じゅけんあるあるね。That's so typical of Todai entrance exams.

東ひがし大だい受験じゅけんあるある。Typical of Todai entrance exams.

第三だいさん問もんはこちら。Here is question 3.

長ながいよ。It's long.

長ながい長ながい長ながい。Long, long, long.

数すうがあります。There is a number.

はい。Yes.

それは二にです。That is 2.

二にでした。It was 2.

甲こうです。It's A.

はい。Yes.

二に。2.

また数かずがありまして、それは一いちです。There is another number, and that is 1.

はい。Yes.

それを乙おつと名付なづけます。Name that B.

はい。Yes.

二に一いち。Two one.

四分しぶんだ。It's a quarter.

四よんペンこれをなす。Four pens, make this.

はい。Yes.

もしだ。If.

もし。If.

二分にぶんだ。It's a half.

もし甲こう大だいなり乙おつであれば加くわえる乙おつ持もって乙おつ。はいはい。If A is greater than B, add, take B and B. Yes yes.

持もって乙おつ。Take B.

さらに乙おつを乙おつに足たすんだ。Furthermore, add B to B.

あまた丙へいを名付なづけてかつて乙おつだったものに丙へいを代入だいにゅうしますと。Ah, name it C again and assign C to what was formerly B.

でもし甲こう七ななよりも小ちいさくなければ。But if it's not smaller than A seven...

だから大だいなり小しょうよりってことか。So it means greater than or less than.

はい。Yes.

減げんずる甲こうを持もって乙おつ。Take Otsu with Kou decreased.

ちょっと待まって無視むしだ。Wait a sec, ignore it.

これ丙へいと名付なづけまして甲こうに丙へいを代入だいにゅうします。We name this Hei and substitute Hei into Kou.

入します。Substitute it.

えこれ一旦いったん本文ほんぶんが終おわります。Uh, this ends the main text for now.

云云うんぬんでね。Blah blah, you know.

あるいはまあだからifをやるかifを満みたさなくなったら別べつの方ほうをやれるみたいなのがあるんでね。Or well, so there's like doing an if, and if the if is no longer satisfied you can do the other one.

この云云うんぬんはforの終おわりじゃなくてif文ぶんの終おわりを指さします。This blah blah refers not to the end of the for but to the end of the if statement.

あのそう思おもってこういう時ときプログラミングある。You know, I think like that, this happens in programming.

先さきに末尾まつびを見みに行いくと云云うんぬんだ云云うんぬんだ。If you look at the end first, it's blah blah, blah blah.

えコードになってるぞ。Huh, it's become code.

であるいはもし甲こうが乙おつと等ひとしいならば甲こうに四よんを加くわえる。Or, if Kou equals Otsu, then add four to Kou.

はい。Yes.

丁ちょうと名付なづけて丁ちょうと名付なづけてで甲こうに丙へいを代入だいにゅうする。はいはい。Name it Tei, name it Tei, and substitute Hei into Kou. Yes yes.

もしそうでなければ甲こうに五ごを加くわえてこれを丁ちょうと名付なづける。If not so, add five to Kou and name this Tei.

はい。Yes.

で甲こうに丙へいを代入だいにゅうしてAnd substitute Hei into Kou,

これがもしが終おわってさらに四よん遍へん繰くり返かえしてるのが終おわりましてで言上ごんじょうする甲こう云々うんぬんを言上ごんじょうする。This ends the if, and further ends repeating it four times, and then report, report Kou blah blah.

でそれを丁ちょうと名付なづけて丁ひのとを出力しゅつりょくしろ。はいはい。And name that Tei and output Tei. Yes yes.

オッケー。はいはい。Okay. Yes yes.

やめてやめてやめてやめて。Stop stop stop stop.

あとやるだけ。Just have to do the rest.

条件じょうけんかこ。A condition, huh.

あの、人間にんげんが理解りかいできる言語げんごですね。Um, a language humans can understand.

理解りかいできる言語げんごなんです。It's a language you can understand.

高級言語こうきゅうげんごですか。Is it a high-level language?

結構けっこう高級こうきゅう。Pretty high-level.

甲こうに2です。2 into Kou.

はい。Yes.

乙おつに2。2 into Otsu.

丙へい出でました。Hei came out.

これもう。This is already.

じゃあスクリプトとかで書かいたの。So you wrote it in a script or something.

ありがとうございます。Thank you.

甲こうに。Into Kou.

別べつの結果けっかで。With a different result.

やめちゃえば。If you just quit.

甲こうが乙おつより大おおきいなら乙おつに2を足たす。If Kou is greater than Otsu, add 2 to Otsu.

して。And.

名前なまえは丙へい。The name is Hei.

でかつて乙おつだったものに丙へいを代入だいにゅうする。And substitute Hei into what was formerly Otsu.

だから乙おつがどんどん2ずつ増ふえ。So Otsu keeps increasing by 2.

乙おつに丙へいを代入だいにゅうした後あとにもし甲こうが7より小ちいさくなければ甲こうから2を引ひく。After substituting Hei into Otsu, if Kou is not less than 7, subtract 2 from Kou.

それを丙へいと名付なづける。Name that Hei.

甲こうは2ずつ減へっていくと。Kou will decrease by 2s.

あるいは丙へい。Or Hei.

甲こうイコール乙おつ。Kou equals Otsu.

甲こうに4を加くわえる。Add 4 to Kou.

甲こうに4を加くわえてくると。はいはいAdd 4 to A. Yes, yes

はい。Yes.

かつて甲こうだったものに丙へいを代入だいにゅうする。はいはいSubstitute C into what was once A. Yes, yes

はい。Yes.

甲こうに4を足たされる。はいはい4 is added to A. Yes, yes

はい。Yes.

最後さいごに。Finally.

にどれでもなければ。If it's neither.

甲こうに五ごをまず。First five to A.

甲こうに五ごを足たして丙へいとする。Add five to A and make it C.

足たしてのことか。You mean adding it.

丙へいを甲こうに代入だいにゅうする。はいはい。Substitute C into A. Yes, yes.

これも一いちを入いりせてね。Put a one in this too.

甲こう丙へい入いれて。Put in A and C.

でこの文面ぶんめんで一旦いったん多分たぶん三みっつの分岐ぶんきが終おわり。はいはい。And with this wording, probably the three branches end for now. Yes, yes.

で最後さいごに残のこっている甲こうと乙おつを掛かけたやつが丙へいだ。And finally, A multiplied by the remaining B is C.

丙へいを入力にゅうりょくしておけましょう。はいはいLet's input C. Yes, yes

はい。Yes.

よっしゃ。Alright.

よっしゃ。Alright.

あとは計算けいさんするだけや。Now we just have to calculate.

オッケー。Okay.

じゃ僕ぼく交互こうごつましやろう。はいはい。Then I'll do them alternately. Yes, yes.

まず甲こうが乙おつより大おおきいです。First, A is greater than B.

ので一個いっこ目めの分岐ぶんきいきましょう。So let's go to the first branch.

はい。Yes.

乙おつ足たす2。B plus 2.

はい。Yes.

その上うえにもう一回いっかいイフが入はいってて、甲こうが七ななよりも大おおきいときは文面ぶんめんなんですが、甲こうにです。On top of that there's another IF, when A is greater than seven the wording is, to A.

じゃ最初さいしょに戻もどって。Then back to the beginning.

はい。Yes.

でじゃ一回いっかいループ終おわりました。あずAnd so one loop is finished. Azu

アイ。I.

アイが担当たんとう。I is in charge.

アイだ。It's I.

アイだ。It's I.

二回にかい目めの二に出だしました。Put out the second two for the second time.

え次つぎは甲こうと乙おつを比較ひかくしたときに、乙おつの方ほうが大おおきい。Uh next, when comparing A and B, B is larger.

甲こうに五ごを足たします。Add five to A.

やばい。Oh no.

二にシースで。ええ。In two Cs. Yeah.

これです。This is it.

甲こう。A.

コンピューターなのでね。Because it's a computer.

確たしかにね。Indeed.

これは自然しぜんですよね。This is natural, isn't it.

ちょっとこちらに入はいりますね。I'll go in here a bit.

はい。Yes.

ああ。Ah.

分わかりづらい。Hard to understand.

七ななと三さんですね。Seven and three.

甲こうです。It's A.

はい。Yes.

三回さんかい目めのループ行いきましょう。Let's go for the third loop.

三回さんかい目め入はいります。Entering the third time.

甲こうの方ほうが大おおきいのでこちらを適用てきようします。Since A is larger, we'll apply this one.

乙おつに二にを足たしてください。Please add two to B.

ええ。Yes.

そうそう。Right, right.

はい。Yes.

えさらに甲こうが七なな以上いじょうなので甲こうから二にを引ひいてください。Also, since A is seven or more, please subtract two from A.

甲こうから二にを引ひく。Subtract two from A.

乙おつ。B.

乙おつだ。It's B.

一緒いっしょだ。They're the same.

すごい。Amazing.

最終さいしゅうループ。Final loop.

はい。Yes.

はい。Yes.

甲こうと乙おつが等ひとしいため甲こうに四よんを足たしてください。Since A and B are equal, please add four to A.

はい。Yes.

はい。Yes.

オッケー。Okay.

四よん回かいやりました。Did it four times.

四よん回かいやりました。Did it four times.

最後さいご掛かけ算ざんしましょう。Finally, let's do the multiplication.

はい。Yes.

九きゅうかける五ごで四十よんじゅう五ご。Nine times five is forty-five.

四十よんじゅう五ご。Forty-five.

はい。Yes.

できた。Done.

だ。There.

はい答こたえはどうぞ。Yes, please give the answer.

四十よんじゅう五ご。レーカー。Forty-five. Raker.

頑張がんばりましたね。You worked hard.

ありがとうございます。Thank you.

半分はんぶんの知識ちしきがあるため。Because I have half the knowledge.

若わかいが出でてきてすぐもしだ。Young ones come out right away though.

うん。Yeah.

その辺へん気きにしている場合ばあいじゃないからね。This is no time to worry about that.

素晴すばらしい。Wonderful.

第二だいに問もんはこちらです。Here is the second question.

わあ短みじかい短みじかい。Wow, it's short, short.

いけるいける。You can do it, you can do it.

いいね。Nice.

ああ。Ah.

配列はいれつが来きた。An array has come.

列れつがあります。There are columns.

配列はいれつってあれだよね。An array is that thing, right?

数字すうじの束たばを入いれていい場所ばしょだよね。It's a place where you can put a bunch of numbers, right?

そうですね。Yes, that's right.

でそれを甲こうと名付なづけます。And we'll name that Kou.

はい。Yes.

え次つぎに数かずがあります。Uh, next there is a number.

はい。Yes.

えこれは二にです。Uh, this is two.

はい。Yes.

で乙おつが二にですよと。はいはいAnd Otsu is two, you know. Yes yes

はい。Yes.

見みました。I saw it.

四分しぶんです。It's four minutes.

はい。Yes.

誤解ごかいを行おこないます。We'll do the misunderstanding.

はい。Yes.

わあ知しらないきた。Wow, an unknown one came.

当あてる。To hit / to apply.

ここに乙おつを持もって当あてる。Bring Otsu here and apply it.

まあ充足じゅうそく性せいを入いれようみたいなことか。Well, it's like let's put in satisfiability.

乙おつに二にをかける。Multiply Otsu by two.

はい。Yes.

でこれを丙へいと名付なづける。And name this Hei.

丙へいから一いちを減へらす。Subtract one from Hei.

これを丁ちょうと名付なづける。Name this Tei.

うん。Yeah.

かつて乙おつだったものを丁ひのとに代入だいにゅうする。Substitute what was once Otsu with Tei.

はい。Yes.

じゃ。Well then.

じゃこれで本文ほんぶん終おわり。Well, with this the main text ends.

はい。Yes.

つまり空そらの入いれ物ものをまず用意よういします。In other words, first prepare an empty container.

はい。Yes.

たら数字すうじをたくさん入いれる箱はこ。Then a box for putting lots of numbers in.

たくさん用意よういされた。Many were prepared.

たくさん入いれる箱はこなんですけどまだ何なにも入はいってない箱はこがあります。It's a box for putting lots in, but there's a box with nothing in it yet.

はい。2Yes. 2

を持もってて。Having.

はい。Yes.

箱はこ2に2入いれる。2Put 2 into box 2. 2

が入はいった。Went in.

はい。Yes.

これを入いれるよって言いったこいつを。Saying we'll put this in, this guy.

2倍にばいして1引ひいて3にしたい。Double it and subtract 1 to make it 3.

今度こんどこれまた3を入いれる。This time put 3 in again.

入いれる。Put in.

はい。Yes.

入いれて3を2倍にばいして1引ひいたら5になる。Put it in, and doubling 3 and subtracting 1 makes 5.

うん。Yeah.

でこれ入いれる。And put this in.

うん。Yeah.

で5が2倍にばいして1引ひいたら9になる。And doubling 5 and subtracting 1 makes 9.

うん。Yeah.

で9入いれる。And put in 9.

うん。Yeah.

で9を2倍にばいして1引ひいたら17入いれる。And double 9 and subtract 1, then put in 17.

はい。Yes.

だから2, 3, 5, 9, 17みたいなのが入はいった箱はこが完成かんせいします。So a box containing things like 2, 3, 5, 9, 17 is completed.

はい。Yes.

で次つぎに甲こうの3番目ばんめですけど甲こうってのは例たとえば箱はこの名前なまえなので。And next is Kou's 3rd, but Kou is for example the name of the box, so.

はい。Yes.

箱はこの3番目ばんめを指さしてて。It's pointing to the 3rd of the box.

なるほど。1I see. 1

だ。is.

はい。3Yes. 3

番目ばんめをボと名付なづけます。はいはいWe'll name the rd one Bo. Yes yes

はい。Yes.

さらに甲こうのボ。Furthermore, Kou's Bo.

甲こうのボというのを。The thing called Kou's Bo.

甲こうの5番目ばんめに持もってくるってことだから。means bringing it to Kou's 5th, so.

ことだからこれを指ゆびさしてて、これを丁ちょうと名なづけて、でその丁ていを書かけってことは、これ、これ、いけ、so it's pointing to this, naming this Tei, and to write that Tei means, this, this, go,

はい、答こたえは、答こたえは十七じゅうななです。Yes, the answer is, the answer is seventeen.

正解せいかい。Correct.

素晴すばらしい。あ、Wonderful. Ah,

須貝すがいが早はやかったね。Sugai was fast.

わかんの?You get it?

配列はいれつ大好だいすきなんだ。あ、I love arrays. Ah,

そうなの?Really?

聞きいたことがない、配列はいれつ大好だいすきな人ひとがいるんだって。Never heard of it, there's a person who loves arrays.

いいですからね。That's fine.

最終さいしゅう問題もんだいはこちら。Here's the final problem.

うーんううん、Hmm,

術じゅつだよ。It's a technique.

多分たぶんこれはファンクションだ。あ、Probably this is a function. Ah,

ファンクションなんか自分じぶんで作つくるって言いってるわ。It says to make a function yourself.

関数かんすう定義ていぎするんじゃないですか。はいはい。Isn't it defining a function. Yes yes.

プログラミングでね、まとめてやりたい操作そうさを先さきに自分じぶんで名前なまえつけて置おいとけるんだよね。In programming, you can give a name in advance to an operation you want to do together.

まあちょっと読よんでみますか。Well, shall we read it a bit.

はい。Yes.

これを甲乙こうおつと呼よぶ。Call this Kou-Otsu.

必かならず、まず一ひとつの数かずを。Always, first one number.

洗面せんめんのインテリアなんでやっぱ。Since it's a washroom interior, after all.

部屋へやのインテリアプログラミングもできる。You can program room interiors too.

この数すうlあだから先さきに数かずを一個いっこlだから。This number l, ah so first one number l, so.

関数かんすうを動作どうささせるんだったら数字すうじがいるでしょ。If you're going to run the function, you need a number, right.

っていう関数かんすうの必須ひっすですね。That's required for the function.

だいたい一般いっぱんにはゼロには。Generally, roughly, to zero.

コがfで。Ko is f.

オツがxだと思おもっています。はいはいはいはい。I think Otsu is x. Yes yes yes yes.

じゃこのf xみたいな感かんじでコオツってあるんですね。So it's like this f x, like Ko-Otsu.

うん。Yeah.

でもしオツが零れいに等ひとしければ、つまり零れいをlオツにゼロを入いれたらゼロを出力しゅつりょくするってことですかね。And if Otsu equals zero, that is, if you put zero into l Otsu, it outputs zero, right.

その関数かんすうで。コゼロIn that function. Ko zero

はゼロ。is zero.

うん。Yeah.

で次つぎにもしオツが一いちと等ひとしいときは一いちをlはい。And next, if Otsu equals one, then one, yes.

ここまで当あてはまっていない場合ばあい、オツから二にを引ひく。If none of the above apply, subtract two from Otsu.

なるほど。I see.

a等とうオツ引ひく二にですね。a equals Otsu minus two.

えで次つぎにtがオツ引ひく一いち。And then t is Otsu minus one.

コにaをおどこし。Put a into Ko, uh where.

ああなんかコっていう関数かんすうをaという引数ひきすうで作動さどうさせる。コ。Ah, like activating a function called Ko with the argument a. Ko.

確たしかに。Indeed.

でそれをボーン。And put that into Bo.

ボーに代入だいにゅうするんで、まあボーイコール、で自分じぶんで自分じぶんを呼よび出だしてるんだな。Assign it to Bo, so well, Bo equals, it's calling itself.

今度こんどはキがこう、こうでなんだ。あキイコールキイコールThis time Ki is like, like this. Ah, Ki equals, Ki equals

こうし、でボとキを足たしたものをこう、でそれを関数かんすうの結果けっかとして出力しゅつりょくする。Like this, and add Bo and Ki, like this, and output that as the function's result.

ここまでが関数かんすうの定義ていぎです。That is the end of the function definition.

はい、オッケー。Yes, okay.

さて、こうに十じゅうを入いれたらどうなるでしょう。Now, what happens if we put ten into Ko.

オッケー。Okay.

まずどっちでもないため、ゼロでも一いちでもないからパターンをやりますよと。First, since it's neither, neither zero nor one, we'll do the pattern.

エーエエとティーに八はちと九きゅうが入はいってる。ボUh, A and T get eight and nine. Bo

はこう、こう、ヘイ、こうヘイ、こうも八はち。is ko, ko, hey, ko hey, ko is also eight.

やばい。Oh no.

ああだから最初さいしょのがいってくるのか。Ah, so the first one is coming.

ああだから下くだっていくんだ。Ah, so it goes down.

下くだっていくんだ。It goes down.

これゼロか一いつになるまで永遠えいえん続つづくんだこれ。This continues forever until it becomes zero or one.

まあ有限ゆうげんだからやればいいのか。Well, it's finite so we can just do it.

これ逆ぎゃくにしたら。If you reverse this.

フィボナッチ数列すうれつになります。It becomes the Fibonacci sequence.

えーと、項こう十じゅうは八はち足たす九きゅうでできていて、九きゅうは項こう八はち足たす項こう七ななだね。Um, term ten is made of eight plus nine, and nine is term eight plus term seven.

うん、そうだね。Yeah, that's right.

だからフィボナッチ数列すうれつと同おなじになる。So it becomes the same as the Fibonacci sequence.

おー、二に個こ前まえの項こうを足たせる。Oh, you add the term two before.

まあ項こうっていうの誰だれか。Well, who calls it term.

やばい。Oh no.

数列すうれつの三番さんばん目めの項こうでした。It was the third term of the sequence.

二番目にばんめ、二番目にばんめ。Second, second.

フィボナッチ数列すうれつなのに。Even though it's the Fibonacci sequence.

でいうと二に個こ前まえの二番目にばんめを足たせる。In that sense, you add the second one two before.

これ以上いじょうに初項しょこうの定義ていぎを与あたえてくれてて、うんうんそうだ。It's giving us the definition of the initial terms beyond this, yeah yeah that's right.

第だいゼロ項こうはゼロ、第一だいいち項こうは一いちとした時ときの直前ちょくぜんの二項にこうを足たした数列すうれつの第だい十じゅう項こうの値あたいを求もとめよっていう問題もんだいだと解釈かいしゃくできます。It can be interpreted as the problem: find the value of the tenth term of the sequence where the zeroth term is zero and the first term is one, adding the previous two terms.

すごい。Amazing.

項こうゼロはゼロ。Term zero is zero.

かかる。It takes.

項こうゼロ、項こう一いちは一いちがかかる。Term zero, term one takes one.

項こう二にはっていうとゼロ足たす一いちの一いつになる。Term two is zero plus one, so it becomes one.

一いつになる。It becomes one.

項こう三さんはっていうと項こう一いち足たす項こう二にになるから、これは一いち足たす一いち、一いつになる。Term three is term one plus term two, so this is one plus one, becomes one.

二にです。It's two.

これを考かんがえていくと、やってることは必須ひっすです。Thinking this through, what we're doing is essential.

すごい。Amazing.

必須ひっすです。It's essential.

第だい十じゅっ個こ。The tenth.

一いち、一いち、二に、二に、三さん、五ご、八はち。One, one, two, two, three, five, eight.

十分じゅうぶん五ご回かいだ。That's five out of ten.

六ろく、七なな個目こめ。The sixth, seventh one.

十三じゅうさん。Thirteen.

八はっ個目こめ。The eighth one.

二十にじゅう一いち。Twenty-one.

九きゅう個目こめ。The ninth one.

三十さんじゅう四よん。Thirty-four.

十じゅっ個目こめ。The tenth one.

ええ、五十ごじゅう五ご。Yes, fifty-five.

いける。You can do it.

え、項こう十じゅうは五十ごじゅう五ご。Uh, the tenth term is fifty-five.

正解せいかい。Correct.

ええ、マスターですね。Yes, you're a master.

マスターしちゃった。You've mastered it.

関数かんすうの中なかでも再帰関数さいきかんすうというものでしたね。It was what we call a recursive function, among functions.

関数かんすうの自分じぶんの定義ていぎの中なかで自分じぶんが出でてくるっていうね。Where the function itself appears inside its own definition.

検証けんしょう大成功だいせいこうということですね。So that means the verification was a huge success.

多少たしょう限げんで理解りかいできるのか。Can it be understood to some extent?

できる。You can.

ということで本日ほんじつは漢文かんぶんみたいなプログラミング言語げんごを人力じんりきで解読かいどくしてまいりましたけれども、皆みなさんどれほどわかったでしょうか。So today we've manually decoded a programming language that looks like classical Chinese, but how much did you all understand?

ぜひコメント欄らんにも漢文かんぶんっぽいコメントお待まちしております。Please leave classical Chinese-style comments in the comments section.

それでは次つぎの動画どうがでお会あいしましょう。Then I'll see you in the next video.

さようなら。バイザクラ。Goodbye. Byezakura.

今日きょうの一問いちもんはこちら。Here is today's question.

本日ほんじつもご視聴しちょういただきありがとうございました。Thank you for watching today as well.

チャンネル登録とうろく、高評価こうひょうかもよろしくお願ねがいします。Please subscribe to the channel and give it a high rating.

概要欄がいようらんからSNSとフォロワークラブ、スコレもぜひチェックしてみてください。Please also check out the SNS, Follow Work Club, and Skole from the description box.

それではまた次つぎの動画どうがでお会あいしましょう。Then I'll see you in the next video.

さようなら。Goodbye.

Keyboard shortcuts

Play / Pause
Space
Previous sentence
←
Next sentence
→
Replay each sentence
R
Show translation
T
Learning
S
Mastered
K
Close
Esc
Theater mode
W
Fullscreen
F
Keyboard shortcuts
?

Get the app

Sign in with the same account and your words and progress stay in sync.