From 62a3c5d2d6329279f88cd021eca4f63793960805 Mon Sep 17 00:00:00 2001 From: Priyangshu yogi Date: Fri, 29 Dec 2017 12:52:02 +0530 Subject: [PATCH] Update README.md --- .../Primality Test/Optimized School Method/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Competitive Coding/Math/Primality Test/Optimized School Method/README.md b/Competitive Coding/Math/Primality Test/Optimized School Method/README.md index fcb900fe9..0bf8c2b10 100644 --- a/Competitive Coding/Math/Primality Test/Optimized School Method/README.md +++ b/Competitive Coding/Math/Primality Test/Optimized School Method/README.md @@ -5,17 +5,17 @@ Examples of first few prime numbers are {2, 3, 5, 7,...} Examples: -Input: n = 11 +**Input:** n = 11 -Output: true +**Output:** true -Input: n = 15 +**Input:** n = 15 -Output: false +**Output:** false -Input: n = 1 +**Input:** n = 1 -Output: false +**Output:** false A simple solution is to iterate through all numbers from 2 to n-1 and for every number check if it divides n. If we find any number that divides, we return false. Instead of checking till n, we can check till √n because a larger factor of n