//Rextester.Program.Main is the entry point for your code. Don't change it.
//Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Text;
namespace Rextester
{
public class Program
{
public static void Main(string[] args)
{
//Your code goes here
DateTime now = DateTime.Now;
string str1 = now.ToString("yyyyMMdd");
now = DateTime.Now;
string s1 = now.ToString("yyyy");
now = DateTime.Now;
string s2 = now.ToString("MMdd");
string pass = "52422";
string lastlogin = "";
byte[] bytes1 = Encoding.ASCII.GetBytes(s1);
byte[] bytes2 = Encoding.ASCII.GetBytes(s2);
string str2 = ((int) bytes1[0] - 48 ^ (int) bytes2[0] - 48).ToString() + (object) ((int) bytes1[1] - 48 ^ (int) bytes2[1] - 48) + (object) ((int) bytes1[2] - 48 ^ (int) bytes2[2] - 48) + (object) ((int) bytes1[3] - 48 ^ (int) bytes2[3] - 48);
string str3 = ((int) bytes1[3] - 48 | (int) bytes2[3] - 48).ToString() + (object) ((int) bytes1[2] - 48 | (int) bytes2[2] - 48) + (object) ((int) bytes1[1] - 48 | (int) bytes2[1] - 48) + (object) ((int) bytes1[0] - 48 | (int) bytes2[0] - 48);
if (pass == str2)
{
Console.WriteLine("Chế độ 1");
}
else if ((lastlogin == "" || lastlogin != str1) && pass == str3)
{
Console.WriteLine("Chế độ 2");
} else {
Console.WriteLine("Mã bảo vệ không đúng hoặc tính năng bị vô hiệu");
}
Console.WriteLine(str1);
Console.WriteLine(str2);
Console.WriteLine(str3);
}
}
}