Skip to content

Instantly share code, notes, and snippets.

@Abubakr0904
Last active December 13, 2021 18:33
Show Gist options
  • Select an option

  • Save Abubakr0904/147d6bf2e8589aba79c7b290efb8526e to your computer and use it in GitHub Desktop.

Select an option

Save Abubakr0904/147d6bf2e8589aba79c7b290efb8526e to your computer and use it in GitHub Desktop.
41-masala
using System;
public class Program
{
public static void Main(string[] args)
{
var son = int.Parse(Console.ReadLine());
for(int i = 2; i <= Math.Sqrt(son) + 1; i++)
{
if(son % i == 0)
{
i = 1;
son++;
}
}
Console.WriteLine($"{son}");
}
}
@mutafakkir
Copy link

Great bro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment