Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat(prime): add JavaScript solution

オープン
#70 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@aadiitya2007 がすでに取り組んでいます。

2026年10月24日 から。

  • #71 @aadiitya2007 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript, node.js
領域
backend

調査の方向性

The issue names the existing solutions in problems/prime/ and asks for solution.js; read those solutions and the problem specification first. Implement the stated stdin handling and primality checks, then confirm the output is exactly prime or not prime for the boundary cases and inputs up to 10^9.

索引モデルが issue の本文から書いたものです。

説明

Description

The prime problem currently provides solutions in C (solution.c), C++ (solution.cpp), Python (solution.py), and Java (Solution.java), but does not have a JavaScript solution.

Proposed Solution

Add problems/prime/solution.js implementing primality checking in Node.js:

  • Read input number n from stdin via fs.readFileSync(0, "utf-8").
  • Handle boundary values ($n < 2$ are not prime, $2$ and $3$ are prime).
  • Use an optimized step loop checking divisors up to $\sqrt{n}$ for efficient execution on numbers up to $10^9$.
  • Output prime or not prime matching existing problem specifications.
主要言語
Python
スター
1
フォーク
6
平均マージ
22時間 41分
マージ済み PR(30日)
27

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

techcsispit/code-corner のほかの issue

techcsispit/code-corner の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。