This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class BitsUp | |
{ | |
static void Main() | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
int step = int.Parse(Console.ReadLine()); | |
int counterBits = 0; | |
for (int i = 0; i < n; i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class FunwithMatrices | |
{ | |
static void Main() | |
{ | |
double startNumber = double.Parse(Console.ReadLine()); | |
double step = double.Parse(Console.ReadLine()); | |
double[,] matrix = new double[4, 4]; | |
for (int r = 0; r< 4; r++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static void Main() | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
Random rnd = new Random(); | |
int numRnd = rnd.Next(1, n+1); | |
int[] numsRandomize = new int[n]; | |
numsRandomize[0] = numRnd; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
private static string input; | |
public static void ConvertBinToDecimal (string input) | |
{ | |
int decimalNum = 0; | |
for (int i = 0; i < input.Length; i++) | |
{ | |
char temp = input[input.Length-i-1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
class Program | |
{ | |
static void Main() | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
int[] num = Console.ReadLine().Split().Select(int.Parse).ToArray(); | |
num = num.Distinct().ToArray(); // Remove duplicates from array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace _07SortedSubsetSums | |
{ | |
class Program | |
{ | |
static void Main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace _03CategorizeNumbers | |
{ | |
class CategorizeNumbers | |
{ | |
static void Main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static void Main() | |
{ | |
List <string> input = new List<string> (Console.ReadLine().Split()); | |
for (int i = 0; i < input.Count; i++) | |
{ | |
if (i<input.Count-1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
class LegoBlocks | |
{ | |
static void Main() | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
string[][] first = new string[n][]; | |
string[][] second = new string[n][]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
class StuckNumbers | |
{ | |
static void Main() | |
{ | |
int n = int.Parse(Console.ReadLine()); | |
int[] nums = Console.ReadLine().Split().Select(int.Parse).ToArray(); | |
bool check = false; | |
if (n < 4) |
OlderNewer