This file contains hidden or 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.IO; | |
class Solution { | |
static void Main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ | |
string[] theInput = Console.ReadLine().Split(' '); | |
int howFar = Convert.ToInt32(theInput[2]); | |
ulong[] theResults = new UInt64[howFar+2]; | |
theResults[0] = Convert.ToUInt64(theInput[0]); |
This file contains hidden or 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.IO; | |
class Solution { | |
static void Main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ | |
int findMe = Convert.ToInt32(Console.ReadLine()); | |
int arraySize = Convert.ToInt32(Console.ReadLine()); | |
int foundHere = 0; | |
string[] findHere = Console.ReadLine().Split(' '); |
This file contains hidden or 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.IO; | |
class Solution { | |
static void Main(String[] args) { | |
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution */ | |
int lineCount; | |
lineCount = Convert.ToInt32(Console.ReadLine()); | |
for(int i = 1; i <= lineCount; i++) { | |
string theword = Console.ReadLine(); |
This file contains hidden or 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
class Person { | |
public int age; | |
public Person(int initialAge) { | |
// Add some more code to run some checks on initialAge | |
if (initialAge < 0) { | |
Console.WriteLine("Age is not valid, setting age to 0."); | |
this.age = 0; | |
} else { | |
this.age = initialAge; | |
} |
This file contains hidden or 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.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
int N = Convert.ToInt32(Console.ReadLine()); | |
if (N%2 == 0) { | |
if(N >= 2 && N<= 5) { |
This file contains hidden or 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.IO; | |
class MealCalculator { | |
static void Main(String[] args) { | |
double mealCost; | |
int tipPercent; | |
int taxPercent; | |
This file contains hidden or 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.IO; | |
class Solution { | |
static int factorial(int thenumber) { | |
if(thenumber <= 1) { | |
return 1; | |
} else { | |
return thenumber * factorial(thenumber-1); | |
} |
This file contains hidden or 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.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
int n = Convert.ToInt32(Console.ReadLine()); | |
string thebinary = Convert.ToString(n, 2); | |
char[] binaryArray = thebinary.ToCharArray(); |
This file contains hidden or 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.IO; | |
using System.Linq; | |
class Solution { | |
static void Main(String[] args) { | |
int[][] arr = new int[6][]; | |
for(int arr_i = 0; arr_i < 6; arr_i++){ | |
string[] arr_temp = Console.ReadLine().Split(' '); |
This file contains hidden or 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
class Student : Person{ | |
private int[] testScores; | |
public Student(string firstName, string lastName, int identification, int[] scores) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
this.id = identification; | |
this.testScores = scores; | |
} | |
public string calculate() { |
OlderNewer