Repository navigation
New challenges: multiplication shortcuts (x 9, x 11, x 99, near round numbers) - #298
Merged
msbelaid merged 3 commits intoNov 23, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
APK size
Release build signed with the CI test key, at cc1fbfe. |
msbelaid
reviewed
Nov 17, 2026
msbelaid
left a comment
Owner
There was a problem hiding this comment.
Thanks for your contribution, I think we can exclude these shortcuts from the other generic challenges!
Signed-off-by: jay23606 <[email protected]>
jay23606
force-pushed
the
pr-go/277-new-challenge-multiplication-shortcuts-1
branch
from
November 17, 2026 21:14
e6f4df5 to
c1ea132
Compare
msbelaid
reviewed
Nov 19, 2026
| override val operand1: Int = (3..9).minus(5).random() | ||
| override val operand2: Int = (3..9).minus(5).random() | ||
| override val operand1: Int = (3..9).minus(listOf(5, 9)).random() | ||
| override val operand2: Int = (3..9).minus(listOf(5, 9)).random() |
Owner
There was a problem hiding this comment.
Could we replace it with listOf(3, 4, 6, 7, 8)
Suggested change
| override val operand2: Int = (3..9).minus(listOf(5, 9)).random() | |
| override val operand1: Int = (3, 4, 6, 7, 8).random() | |
| override val operand2: Int = (3, 4, 6, 7, 8).random() |
Signed-off-by: jay23606 <[email protected]>
msbelaid
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the five multiplication shortcut challenges requested in #277:
MultiplicationSingleDigitByNineChallenge9 x 7MultiplicationTwoDigitByElevenChallenge11 x 43MultiplicationSingleDigitByNinetyNineChallenge6 x 99MultiplicationSingleDigitByNumberEndingInNineChallenge6 x 19,8 x 49MultiplicationTwoDigitByElevenToNineteenChallenge14 x 23All operands are positive, so every answer is a whole number. Each class is registered in
ChallengesModule.kt.Generic multiplication challenges now avoid generating the same shortcut patterns: single-digit products omit 9, single-by-double-digit products omit two-digit factors ending in 9, and double-by-double-digit products omit factors from 11 through 19.
Tests
The new challenge tests check difficulty, operand ranges, and answers. The generic multiplication range tests now sample 100 instances to verify the shortcut exclusions.
These commands passed on the initial implementation head
20602fd:./gradlew.bat :challenges:test --tests "app.plugbrain.android.challenges.MultiplicationShortcutsChallengeTest" --tests "app.plugbrain.android.challenges.MultiplicationChallengeTest" --offline./gradlew.bat :challenges:ktlintCheck :app:ktlintCheck --offlineI could not rerun Gradle for the follow-up commit locally: the offline cache is missing
org.gradle.kotlin.kotlin-dsl:5.2.0. CI will validate the updated range tests on the current head. Detekt and the full./gradlew testsuite were not run locally.Fixes #277