Day i do not know
This commit is contained in:
11
136. Single Number/136. Single Number.csproj
Normal file
11
136. Single Number/136. Single Number.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RootNamespace>_136._Single_Number</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
9
136. Single Number/Program.cs
Normal file
9
136. Single Number/Program.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace _136._Single_Number;
|
||||
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("Hello, World!");
|
||||
}
|
||||
}
|
||||
12
136. Single Number/Solution.cs
Normal file
12
136. Single Number/Solution.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace _136._Single_Number;
|
||||
|
||||
public class Solution
|
||||
{
|
||||
public int SingleNumber(int[] nums)
|
||||
{
|
||||
int res = 0;
|
||||
foreach (int num in nums)
|
||||
res ^= num;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user