Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/lib/initialExpressionContainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,20 @@ export const ibfr = initializeExpressionContainer([
}
])

export const crxl = initializeExpressionContainer([
[
addParams('a', 'b', 'c', 'd'),
{
shorthandNumberAfterConvert: 'number',
shorthandNumber: 3
}
],
{
shorthandNumberAfterConvert: 'number',
shorthandNumber: 2
}
])

export const bgiy = initializeExpressionContainer({
shorthandNumberAfterConvert: 'number',
shorthandNumber: 5
Expand Down
6 changes: 6 additions & 0 deletions scripts/lib/runnerConfigs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,12 @@ export const mlnt: ExpressionRunnerShorthandConfig = {
showPriorities: true
}

export const ochk: ExpressionRunnerShorthandConfig = {
runner: 'simple',
initialExpressionContainer: initialExpressionContainers.crxl,
showPriorities: true
}

export const ryqp: ExpressionRunnerShorthandConfig = {
runner: 'simple',
initialExpressionContainer: initialExpressionContainers.bgiy
Expand Down
12 changes: 12 additions & 0 deletions src/components/Runners/Ochk.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react'
import ExpressionRunnerPrecomputed from 'src/components/ExpressionRunnerPrecomputed'
import config from 'src/lib/runners/ochk.json'

const Ochk = ({ children }: { children?: React.ReactNode }) => (
// @ts-ignore
<ExpressionRunnerPrecomputed {...config}>
{children}
</ExpressionRunnerPrecomputed>
)

export default Ochk
1 change: 1 addition & 0 deletions src/components/Runners/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ export { default as Ugvz } from 'src/components/Runners/Ugvz'
export { default as Xkcm } from 'src/components/Runners/Xkcm'
export { default as Edzu } from 'src/components/Runners/Edzu'
export { default as Mlnt } from 'src/components/Runners/Mlnt'
export { default as Ochk } from 'src/components/Runners/Ochk'
export { default as Ryqp } from 'src/components/Runners/Ryqp'
export { default as Vqyl } from 'src/components/Runners/Vqyl'
export { default as Wzqv } from 'src/components/Runners/Wzqv'
Expand Down
98 changes: 87 additions & 11 deletions src/contents/15.jp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,11 @@ export default () => (
type: 'devil',
children: (
<>
<P>
階乗を計算するためには、先ほど紹介した
<Highlight>掛け算を計算できる弁当箱</Highlight>
を使う必要があるわけだが…
</P>
<P>
まず、
<HighlightBold>
Expand All @@ -928,7 +933,7 @@ export default () => (
/>
<R.Vqyl>掛け算を計算できる弁当箱を…</R.Vqyl>
<ExpressionRunnerSeparator />
<R.Trwj>省略表記してみる</R.Trwj>
<R.Trwj>以下のように省略表記してみる</R.Trwj>
<BubbleQuotes
quotes={[
{
Expand All @@ -950,10 +955,7 @@ export default () => (
]}
description={
<>
<CustomEmoji type="blankNumberPurple" />{' '}
<Emoji>✖️</Emoji>{' '}
<CustomEmoji type="blankNumberPink" />{' '}
を掛け算してくれる
<MultiplyIcon /> のアイコンが掛け算を示す
</>
}
/>
Expand All @@ -965,25 +967,75 @@ export default () => (
children: (
<>
<P>
そうだ。試しに、こちらを
<H args={{ name: 'play' }} /> してみるといい:
そうだ。
<Highlight>
次に紹介する、階乗を計算できる弁当箱は複雑なので、こういった省略表記を使わないとスペースが足りなくなる。
</Highlight>
</P>
<P>
だから、 掛け算を <MultiplyIcon />{' '}
のアイコンで省略表記することにしたというわけだ。
</P>
</>
)
},
{
type: 'thinking',
children: (
<>
<P>そうか、了解!</P>
</>
)
},
{
type: 'devil',
children: (
<>
<P>ここで具体例を見てみよう。</P>
<P>
たとえば、こちらの <EmojiNumber number={2} />{' '}
<Emoji>✖️</Emoji> <EmojiNumber number={3} />{' '}
を計算できる弁当箱は…
</P>
</>
)
}
]}
/>
<R.Ochk>
<EmojiNumber number={2} /> <Emoji>✖️</Emoji>{' '}
<EmojiNumber number={3} /> を計算できる弁当箱
</R.Ochk>
<BubbleQuotes
quotes={[
{
type: 'devil',
children: (
<>
<P>
以下のように <MultiplyIcon /> を使って省略表記できる。
</P>
<P>
<H args={{ name: 'play' }} /> を押してみると、ちゃんと{' '}
<EmojiNumber number={2} /> <Emoji>✖️</Emoji>{' '}
<EmojiNumber number={3} /> が計算できるぞ。
</P>
</>
)
}
]}
/>
<R.Potg></R.Potg>
<R.Potg>
上の弁当箱を <MultiplyIcon /> で省略表記してみた
</R.Potg>
<BubbleQuotes
quotes={[
{
type: 'thinking',
children: (
<>
<P>
なるほど、これで <EmojiNumber number={2} />{' '}
<Emoji>✖️</Emoji> <EmojiNumber number={3} />{' '}
を計算できるんだな。
なるほど。で、この省略表記をどう使って階乗を計算するんだい?
</P>
</>
)
Expand Down Expand Up @@ -1511,6 +1563,30 @@ export default () => (
</>
}
/>
<BubbleQuotes
quotes={[
{
type: 'smile',
children: (
<>
<P>
まさに、「
<HighlightBold>魔法のYコンビネータ</HighlightBold>
」だな!
</P>
</>
)
}
]}
/>
<EmojiSeparator
emojis={['✨', '🧙‍♀️', '✨']}
description={
<>
<HighlightBold>魔法のYコンビネータ</HighlightBold>
</>
}
/>
</>
)
},
Expand Down
Loading