buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
change_count
int64
0
100
using System; using System.Linq; namespace Ex160506_1 { public class Program { public static void Main(string[] args) { Console.ReadLine(); var an = Array.ConvertAll(Console.ReadLine().Split(' '), int.Parse); Console.WriteLine("{0} {1} {2}", an.Min(), an.Max(), an.Sum()); } } }
using System; using System.Linq; namespace Ex160506_1 { public class Program { public static void Main(string[] args) { Console.ReadLine(); var an = Array.ConvertAll(Console.ReadLine().Split(' '), long.Parse); Console.WriteLine("{0} {1} {2}", an.Min(), an.Max(), an.Sum()); } } }
[["-", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
87
2
using System; using System.Linq; namespace tes { class Program { static void Main(string[] args) { // ??´??°?????° var n = int.Parse(Console.ReadLine()); // n????????´??°???????????????????????? var line2 = Console.ReadLine().Split(); int[] x = new int[n]; int max, min, sum; for (int i = 0; i < n; i++) { x[i] = int.Parse(line2[i]); } max = x.Max(); min = x.Min(); sum = x.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
using System; using System.Linq; namespace tes { class Program { static void Main(string[] args) { // ??´??°?????° var n = int.Parse(Console.ReadLine()); // n????????´??°???????????????????????? var line2 = Console.ReadLine().Split(); double[] x = new double[n]; double max, min, sum; for (int i = 0; i < n; i++) { x[i] = double.Parse(line2[i]); } max = x.Max(); min = x.Min(); sum = x.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199]]
8
144
8
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_4D { class Program { static void Main(string[] args) { Console.ReadLine(); string[] StringArray = Console.ReadLine().Split(' '); int[] NumArray = Array.ConvertAll( StringArray, new Converter<string, int>(s => int.Parse(s))); Console.WriteLine(NumArray.Min() + " " + NumArray.Max() + " " + NumArray.Sum()); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_4D2 { class Program { static void Main(string[] args) { Console.ReadLine(); string[] StringArray = Console.ReadLine().Split(' '); long[] NumArray = Array.ConvertAll( StringArray, new Converter<string, long>(s => long.Parse(s))); Console.WriteLine(NumArray.Min() + " " + NumArray.Max() + " " + NumArray.Sum()); } } }
[["-", 36, 36, 36, 36, 0, 208, 0, 209, 141, 22], ["+", 36, 36, 36, 36, 0, 208, 0, 209, 141, 22], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 28, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 28, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
124
8
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split().Select(int.Parse).ToArray(); var x = a[0]; var y = a[0]; var z = (0); foreach (var i in Enumerable.Range(0, n - 1)) { if (x > a[i + 1]) { x = a[i + 1]; } } foreach (var i in Enumerable.Range(0, n - 1)) { if (y < a[i + 1]) { y = a[i + 1]; } } foreach (var i in Enumerable.Range(0, n)) { z = z + a[i]; } Console.WriteLine("{0} {1} {2}", x, y, z); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine().Split().Select(int.Parse).ToArray(); var x = a[0]; var y = a[0]; long z = (0); foreach (var i in Enumerable.Range(0, n - 1)) { if (x > a[i + 1]) { x = a[i + 1]; } } foreach (var i in Enumerable.Range(0, n - 1)) { if (y < a[i + 1]) { y = a[i + 1]; } } foreach (var i in Enumerable.Range(0, n)) { z = z + a[i]; } Console.WriteLine("{0} {1} {2}", x, y, z); } } }
[["-", 8, 196, 0, 197, 0, 198, 39, 216, 0, 217], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
220
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication22 { class Program { static void Main(string[] args) { var a = int.Parse(Console.ReadLine()); var b = Console.ReadLine().Split().Select(int.Parse).ToArray(); long sum = 0; foreach (var i in Enumerable.Range(0, a)) { sum += b[i]; } int d = 1000000; foreach (var i in Enumerable.Range(0, a)) { if (d > b[i]) { d = b[i]; } } int e = 0; foreach (var i in Enumerable.Range(0, a)) { if (e < b[i]) { e = b[i]; } } Console.WriteLine("{0} {1} {2}", d, e, sum); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication22 { class Program { static void Main(string[] args) { var a = int.Parse(Console.ReadLine()); var b = Console.ReadLine().Split().Select(int.Parse).ToArray(); long sum = 0; foreach (var i in Enumerable.Range(0, a)) { sum += b[i]; } int d = 1000000; foreach (var i in Enumerable.Range(0, a)) { if (d > b[i]) { d = b[i]; } } int e = -1000000; foreach (var i in Enumerable.Range(0, a)) { if (e < b[i]) { e = b[i]; } } Console.WriteLine("{0} {1} {2}", d, e, sum); } } }
[["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 33], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203]]
8
198
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp9 { class Program { public static void Main(string[] args) { int a = int.Parse(Console.ReadLine()), c = 0; int[] sss = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); Array.Sort(sss); Console.Write("{0} {1} ", sss[0], sss[a - 1]); for (int b = 0; b < a; b++) { c = c + sss[b]; } Console.WriteLine(c); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp9 { class Program { public static void Main(string[] args) { long a = int.Parse(Console.ReadLine()), c = 0; long[] sss = Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); Array.Sort(sss); Console.Write("{0} {1} ", sss[0], sss[a - 1]); for (int b = 0; b < a; b++) { c = c + sss[b]; } Console.WriteLine(c); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
147
6
using System; using System.Collections.Generic; namespace CA { class Program { static void Main(string[] args) { int i = int.Parse(Console.ReadLine()); int sum = 0; string[] str = Console.ReadLine().Split(' '); List<int> l = new List<int>(); foreach (string s in str) { sum += int.Parse(s); l.Add(int.Parse(s)); } l.Sort(); Console.WriteLine("{0} {1} {2}", l[0], l[i - 1], sum); } } }
using System; using System.Collections.Generic; namespace CA { class Program { static void Main(string[] args) { int i = int.Parse(Console.ReadLine()); long sum = 0; string[] str = Console.ReadLine().Split(' '); List<long> l = new List<long>(); foreach (string s in str) { sum += long.Parse(s); l.Add(long.Parse(s)); } l.Sort(); Console.WriteLine("{0} {1} {2}", l[0], l[i - 1], sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 199], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 205, 199]]
8
139
10
using System; using System.Collections.Generic; class Program { static void Main() { // values var input = Console.ReadLine(); // Input n int n = int.Parse(input); // Input integers. string[] str = input.Split(' '); int max = int.Parse(str[0]); int min = int.Parse(str[0]); long sum = 0; // n times loop. for (int i = 0; i < n; i++) { if (int.Parse(str[i]) < min) { // Update min min = int.Parse(str[i]); } if (int.Parse(str[i]) > max) { // Update max max = int.Parse(str[i]); } // Update sum sum += int.Parse(str[i]); } // Output Console.WriteLine("{0} {1} {2}", min, max, sum); } }
using System; using System.Collections.Generic; class Program { static void Main() { // values var input = Console.ReadLine(); // Input n int n = int.Parse(input); // Input integers. string[] str = Console.ReadLine().Split(' '); int max = int.Parse(str[0]); int min = int.Parse(str[0]); long sum = 0; // n times loop. for (int i = 0; i < n; i++) { if (int.Parse(str[i]) < min) { // Update min min = int.Parse(str[i]); } if (int.Parse(str[i]) > max) { // Update max max = int.Parse(str[i]); } // Update sum sum += int.Parse(str[i]); } // Output Console.WriteLine("{0} {1} {2}", min, max, sum); } }
[["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 22], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 205, 22], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 0, 131], ["+", 0, 213, 63, 214, 205, 213, 63, 214, 141, 22], ["+", 0, 213, 63, 214, 205, 213, 3, 4, 0, 24], ["+", 0, 213, 63, 214, 205, 213, 3, 4, 0, 25]]
8
192
6
using System; using System.Collections.Generic; using System.Linq; namespace AOJ { public class AOJ { public static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); var li = Console.ReadLine().Split(' ').Select(int.Parse).Take(count); Console.WriteLine("{0} {1} {2}", li.Min(), li.Max(), li.Sum()); } } }
using System; using System.Collections.Generic; using System.Linq; namespace AOJ { public class AOJ { public static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); var li = Console.ReadLine().Split(' ').Select(long.Parse).Take(count); Console.WriteLine("{0} {1} {2}", li.Min(), li.Max(), li.Sum()); } } }
[["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
105
2
using System; namespace AOJ { class Program { static void Main(string[] args) { var read = Console.ReadLine(); read = Console.ReadLine(); var temp_string = read.Split(' '); int min = 1000000, max = -1000000, total = 0; foreach (string a in temp_string) { int temp = int.Parse(a); if (temp > max) { max = temp; } if (temp < min) { min = temp; } total += temp; } Console.WriteLine(min + " " + max + " " + total); } } }
using System; namespace AOJ { class Program { static void Main(string[] args) { var read = Console.ReadLine(); read = Console.ReadLine(); var temp_string = read.Split(' '); int min = 1000000, max = -1000000; long total = 0; foreach (string a in temp_string) { int temp = int.Parse(a); if (temp > max) { max = temp; } if (temp < min) { min = temp; } total += temp; } Console.WriteLine(min + " " + max + " " + total); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
131
3
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string input = Console.ReadLine(); string[] array = input.Split(' '); int min = 0, max = 0, sum = 0; int[] outp = new int[n]; for (int t = 0; t < array.Length; t++) { outp[t] = int.Parse(array[t]); sum = sum + outp[t]; } for (int i = 0; i < outp.Length; i++) { for (int j = outp.Length - 1; j > i; j--) { if (outp[i] > outp[j]) { int w = outp[i]; outp[i] = outp[j]; outp[j] = w; } } } min = outp[0]; max = outp[outp.Length - 1]; Console.WriteLine(string.Format("{0} {1} {2}", min, max, sum)); } } }
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string input = Console.ReadLine(); string[] array = input.Split(' '); int min = 0, max = 0; long sum = 0; int[] outp = new int[n]; for (int t = 0; t < array.Length; t++) { outp[t] = int.Parse(array[t]); sum = sum + outp[t]; } for (int i = 0; i < outp.Length; i++) { for (int j = outp.Length - 1; j > i; j--) { if (outp[i] > outp[j]) { int w = outp[i]; outp[i] = outp[j]; outp[j] = w; } } } min = outp[0]; max = outp[outp.Length - 1]; Console.WriteLine(string.Format("{0} {1} {2}", min, max, sum)); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
240
3
using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; Reader.ReadLine(); int[] inpt = Reader.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray(); Console.WriteLine(inpt.Min() + " " + inpt.Max() + " " + inpt.Sum()); } public class Reader { public static bool IsDebug = true; private static String PlainInput = @" 5 10 1 5 4 17 "; private static System.IO.StringReader Sr = null; public static string ReadLine() { if (IsDebug) { if (Sr == null) { Sr = new System.IO.StringReader(PlainInput.Trim()); } return Sr.ReadLine(); } else { return Console.ReadLine(); } } } static void Main() { Program prg = new Program(); prg.Proc(); } }
using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; Reader.ReadLine(); long[] inpt = Reader.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray(); Console.WriteLine(inpt.Min() + " " + inpt.Max() + " " + inpt.Sum()); } public class Reader { public static bool IsDebug = true; private static String PlainInput = @" 5 10 1 5 4 17 "; private static System.IO.StringReader Sr = null; public static string ReadLine() { if (IsDebug) { if (Sr == null) { Sr = new System.IO.StringReader(PlainInput.Trim()); } return Sr.ReadLine(); } else { return Console.ReadLine(); } } } static void Main() { Program prg = new Program(); prg.Proc(); } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
214
4
using System; class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] a = new int[n]; int max = 0; int min = 10000000; int sum = 0; string str = Console.ReadLine(); string[] spStr = str.Split(' '); for (int i = 0; i < n; i++) { a[i] = int.Parse(spStr[i]); if (a[i] < min) { min = a[i]; } if (a[i] > max) { max = a[i]; } sum += a[i]; } Console.WriteLine(min + " " + max + " " + sum); } }
using System; class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] a = new int[n]; long max = -10000000; long min = 10000000; long sum = 0; string str = Console.ReadLine(); string[] spStr = str.Split(' '); for (int i = 0; i < n; i++) { a[i] = int.Parse(spStr[i]); if (a[i] < min) { min = a[i]; } if (a[i] > max) { max = a[i]; } sum += a[i]; } Console.WriteLine(min + " " + max + " " + sum); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 33], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203]]
8
175
9
using System; class ITP1_4_D { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] Input_Str = Console.ReadLine().Split(' '); int[] Input_Num = new int[n]; int min, max, sum = 0; for (int i = 0; i < n; i++) Input_Num[i] = int.Parse(Input_Str[i]); min = Input_Num[0]; max = Input_Num[0]; for (int i = 0; i < n; i++) { if (Input_Num[i] < min) min = Input_Num[i]; if (Input_Num[i] > max) max = Input_Num[i]; sum += Input_Num[i]; } Console.WriteLine(min + " " + max + " " + sum); } }
using System; class ITP1_4_D { public static void Main() { int n = int.Parse(Console.ReadLine()); string[] Input_Str = Console.ReadLine().Split(' '); int[] Input_Num = new int[n]; int min, max; long sum = 0; for (int i = 0; i < n; i++) Input_Num[i] = int.Parse(Input_Str[i]); min = Input_Num[0]; max = Input_Num[0]; for (int i = 0; i < n; i++) { if (Input_Num[i] < min) min = Input_Num[i]; if (Input_Num[i] > max) max = Input_Num[i]; sum += Input_Num[i]; } Console.WriteLine(min + " " + max + " " + sum); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
184
3
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { Console.ReadLine(); string[] array = Console.ReadLine().Split(' '); List<int> nums = new List<int>(); foreach (string v in array) { nums.Add(int.Parse(v)); } Console.WriteLine(nums.Min() + " " + nums.Max() + " " + nums.Sum()); } } }
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { Console.ReadLine(); string[] array = Console.ReadLine().Split(' '); List<long> nums = new List<long>(); foreach (string v in array) { nums.Add(long.Parse(v)); } Console.WriteLine(nums.Min() + " " + nums.Max() + " " + nums.Sum()); } } }
[["-", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 199], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 205, 199]]
8
124
6
using System; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string s = Console.ReadLine(); string[] sar = s.Split(' '); int[] a = new int[n]; int sum = 0; for (int i = 0; i < n; i++) { a[i] = int.Parse(sar[i]); sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0].ToString("D"), a[n - 1].ToString("D"), sum.ToString("D")); } } }
using System; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string s = Console.ReadLine(); string[] sar = s.Split(' '); int[] a = new int[n]; long sum = 0; for (int i = 0; i < n; i++) { a[i] = int.Parse(sar[i]); sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0].ToString("D"), a[n - 1].ToString("D"), sum.ToString("D")); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
165
2
using System; namespace ITP1_4_D { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] strs = Console.ReadLine().Split(' '); int min = int.MaxValue; int max = int.MinValue; int sum = 0; for (int i = 0; i < n; i++) { int a = int.Parse(strs[i]); min = a < min ? a : min; max = a > max ? a : max; sum += a; } Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
using System; namespace ITP1_4_D { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); string[] strs = Console.ReadLine().Split(' '); int min = int.MaxValue; int max = int.MinValue; long sum = 0; for (int i = 0; i < n; i++) { int a = int.Parse(strs[i]); min = a < min ? a : min; max = a > max ? a : max; sum += a; } Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
141
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication32 { class Program { static void Main() { int a = int.Parse(Console.ReadLine()); var b = Console.ReadLine().Split().Select(int.Parse).ToArray(); int d = 0; Array.Sort(b); for (int c = 0; c < a; c++) d += b[c]; Console.WriteLine("{0} {1} {2}", b[0], b[a - 1], d); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication32 { class Program { static void Main() { int a = int.Parse(Console.ReadLine()); var b = Console.ReadLine().Split().Select(int.Parse).ToArray(); long d = 0; Array.Sort(b); for (int c = 0; c < a; c++) d += b[c]; Console.WriteLine("{0} {1} {2}", b[0], b[a - 1], d); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
129
2
using System; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] arr = new int[count]; int max = int.MinValue; int min = int.MaxValue; int sum = 0; for (int i = 0; i < count; i++) { arr[i] = int.Parse(input[i]); if (max < arr[i]) { max = arr[i]; } if (min > arr[i]) { min = arr[i]; } sum += arr[i]; } Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
using System; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string[] input = Console.ReadLine().Split(' '); int[] arr = new int[count]; int max = int.MinValue; int min = int.MaxValue; long sum = 0; for (int i = 0; i < count; i++) { arr[i] = int.Parse(input[i]); if (max < arr[i]) { max = arr[i]; } if (min > arr[i]) { min = arr[i]; } sum += arr[i]; } Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
173
2
using System; using System.Linq; namespace ITP1_4_D { class Program { static void Main(string[] args) { Console.ReadLine(); string[] input = Console.ReadLine().Split(' '); int[] intAry = Array.ConvertAll(input, int.Parse); Console.WriteLine("{0} {1} {2}", intAry.Min(), intAry.Max(), intAry.Sum()); } } }
using System; using System.Linq; namespace ITP1_4_D { class Program { static void Main(string[] args) { Console.ReadLine(); string[] input = Console.ReadLine().Split(' '); long[] intAry = Array.ConvertAll(input, long.Parse); Console.WriteLine("{0} {1} {2}", intAry.Min(), intAry.Max(), intAry.Sum()); } } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
94
4
using System; class aizu { public static int Main() { int i, m, sum, max, min; int[] n = new int[10000]; string[] str = new string[10000]; str = Console.ReadLine().Split(' '); m = int.Parse(str[0]); str = Console.ReadLine().Split(' '); n[0] = int.Parse(str[0]); min = n[0]; max = n[0]; sum = n[0]; for (i = 1; i < m; i++) { n[i] = int.Parse(str[i]); sum += n[i]; if (n[i] > max) max = n[i]; if (min > n[i]) min = n[i]; } Console.WriteLine("{0} {1} {2}", min, max, sum); return 0; } }
using System; class aizu { public static int Main() { int i, m; long sum, max, min; int[] n = new int[10000]; string[] str = new string[10000]; str = Console.ReadLine().Split(' '); m = int.Parse(str[0]); str = Console.ReadLine().Split(' '); n[0] = int.Parse(str[0]); min = n[0]; max = n[0]; sum = n[0]; for (i = 1; i < m; i++) { n[i] = int.Parse(str[i]); sum += n[i]; if (n[i] > max) max = n[i]; if (min > n[i]) min = n[i]; } Console.WriteLine("{0} {1} {2}", min, max, sum); return 0; } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
213
3
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); string dataSet = Console.ReadLine(); string[] data = dataSet.Split(); int[] m = new int[n]; int mini; int max; int sum; for (int i = 0; i < n; i++) { m[i] = int.Parse(data[i]); } mini = m[0]; max = m[0]; sum = m[0]; for (int j = 1; j < n; j++) { if (mini > m[j]) { mini = m[j]; } else if (max < m[j]) { max = m[j]; } sum = sum + m[j]; } Console.WriteLine("{0} {1} {2}", mini, max, sum); } }
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); string dataSet = Console.ReadLine(); string[] data = dataSet.Split(); int[] m = new int[n]; int mini; int max; long sum; for (int i = 0; i < n; i++) { m[i] = int.Parse(data[i]); } mini = m[0]; max = m[0]; sum = m[0]; for (int j = 1; j < n; j++) { if (mini > m[j]) { mini = m[j]; } else if (max < m[j]) { max = m[j]; } sum = sum + m[j]; } Console.WriteLine("{0} {1} {2}", mini, max, sum); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
199
2
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] s = new string[n]; s = Console.ReadLine().Split(' '); int[] a = new int[s.Length]; for (int i = 0; i < s.Length; i++) { a[i] = int.Parse(s[i]); } for (int i = 0; i < a.Length; i++) { if (a[0] > a[i]) { int tmp = a[0]; a[0] = a[i]; a[i] = tmp; i = 0; } } int min = a[0]; for (int i = 0; i < a.Length; i++) { if (a[0] < a[i]) { int tmp = a[0]; a[0] = a[i]; a[i] = tmp; i = 0; } } int max = a[0]; int sum = 0; foreach (int x in a) { sum += x; } Console.Write("{0} {1} {2}", min, max, sum); } }
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] s = new string[n]; s = Console.ReadLine().Split(' '); int[] a = new int[s.Length]; for (int i = 0; i < s.Length; i++) { a[i] = int.Parse(s[i]); } for (int i = 0; i < a.Length; i++) { if (a[0] > a[i]) { int tmp = a[0]; a[0] = a[i]; a[i] = tmp; i = -1; } } int min = a[0]; for (int i = 0; i < a.Length; i++) { if (a[0] < a[i]) { int tmp = a[0]; a[0] = a[i]; a[i] = tmp; i = -1; } } int max = a[0]; long sum = 0; foreach (int x in a) { sum += x; } Console.WriteLine("{0} {1} {2}", min, max, sum); } }
[["-", 0, 57, 64, 196, 0, 1, 0, 11, 12, 203], ["+", 64, 196, 0, 1, 0, 11, 12, 241, 0, 33], ["+", 64, 196, 0, 1, 0, 11, 12, 241, 0, 203], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
8
271
10
using System; class AOJ { public static void Main() { String st1 = Console.ReadLine(); int a = int.Parse(st1); int min = 1000000000; int max = -100000000; int sum = 0; String[] st = Console.ReadLine().Split(' '); for (int b = 0; b < a; b++) { int c = int.Parse(st[b]); if (min > c) min = c; if (max < c) max = c; sum += c; } Console.WriteLine("{0} {1} {2}", min, max, sum); } }
using System; class AOJ { public static void Main() { String st1 = Console.ReadLine(); int a = int.Parse(st1); int min = 1000000000; int max = -1000000000; long sum = 0; String[] st = Console.ReadLine().Split(' '); for (int b = 0; b < a; b++) { int c = int.Parse(st[b]); if (min > c) min = c; if (max < c) max = c; sum += (long)c; } Console.WriteLine("{0} {1} {2}", min, max, sum); } }
[["-", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25]]
8
136
7
using System; using System.Linq; class aizu_judge { static void Main() { Console.ReadLine(); int[] num = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.WriteLine("{0} {1} {2}", num.Min(), num.Max(), num.Sum()); } }
using System; using System.Linq; class aizu_judge { static void Main() { Console.ReadLine(); long[] num = Console.ReadLine().Split().Select(long.Parse).ToArray(); Console.WriteLine("{0} {1} {2}", num.Min(), num.Max(), num.Sum()); } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
78
4
using System; using System.Collections.Generic; using System.Linq; namespace Problemex5_1 { class Program { static void Main(string[] args) { int.Parse(Console.ReadLine()); var array = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); } } }
using System; using System.Collections.Generic; using System.Linq; namespace Problemex5_1 { class Program { static void Main(string[] args) { int.Parse(Console.ReadLine()); var array = Console.ReadLine().Split().Select(long.Parse).ToArray(); Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); } } }
[["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
100
2
using System; using System.Collections.Generic; using System.Collections; // using System.Linq; // using System.Text; // using System.Threading.Tasks; // namespace _1_A //{ class Program { static void Main(string[] args) { int min = 1000001; int max = (-1000001); int sum = 0; string n = Console.ReadLine(); int[] a = new int[int.Parse(n)]; string inp = Console.ReadLine(); string[] oup = inp.Split(' '); for (int i = 0; i < int.Parse(n); i++) a[i] = int.Parse(oup[i]); for (int i = 0; i < int.Parse(n); i++) { if (min > a[i]) min = a[i]; if (max < a[i]) max = a[i]; sum += a[i]; } Console.WriteLine(min + " " + max + " " + sum); // Console.Read(); } } //}
using System; using System.Collections.Generic; using System.Collections; // using System.Linq; // using System.Text; // using System.Threading.Tasks; // namespace _1_A //{ class Program { static void Main(string[] args) { int min = 1000001; int max = (-1000001); long sum = 0; string n = Console.ReadLine(); int[] a = new int[int.Parse(n)]; string inp = Console.ReadLine(); string[] oup = inp.Split(' '); for (int i = 0; i < int.Parse(n); i++) a[i] = int.Parse(oup[i]); for (int i = 0; i < int.Parse(n); i++) { if (min > a[i]) min = a[i]; if (max < a[i]) max = a[i]; sum += a[i]; } Console.WriteLine(min + " " + max + " " + sum); // Console.Read(); } } //}
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
216
2
// ITP1_4_D using System; using System.Collections.Generic; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int max = -1000000, min = 1000000, sum = 0; //?????????????????????????????????int??????iaaray????????????????????\ int[] iarray = Array.ConvertAll<string, int>( (Console.ReadLine().Split(' ')), delegate(string value) { return int.Parse(value); }); for (int i = 0; i < n; i++) { sum += iarray[i]; //????¨????????????? if (iarray[i] > max) //?????§???????????§???????????°??´??° max = iarray[i]; if (iarray[i] < min) //????°???????????°????????????°??´??° min = iarray[i]; } Console.WriteLine(min + " " + max + " " + sum); //????°????????????§??????????¨?????????? } }
// ITP1_4_D using System; using System.Collections.Generic; class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int max = -1000000, min = 1000000; double sum = 0; //?????????????????????????????????int??????iaaray????????????????????\ int[] iarray = Array.ConvertAll<string, int>( (Console.ReadLine().Split(' ')), delegate(string value) { return int.Parse(value); }); for (int i = 0; i < n; i++) { sum += iarray[i]; //????¨????????????? if (iarray[i] > max) //?????§???????????§???????????°??´??° max = iarray[i]; if (iarray[i] < min) //????°???????????°????????????°??´??° min = iarray[i]; } Console.WriteLine(min + " " + max + " " + sum); //????°????????????§??????????¨?????????? } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
179
3
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace _20170409_AOJ { class Program { static void Main(string[] args) { Console.ReadLine(); int[] arr = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); int min = int.MaxValue; int max = int.MinValue; int sum = 0; foreach (int v in arr) { min = Math.Min(min, v); max = Math.Max(max, v); sum += v; } Console.WriteLine("{0} {1} {2}", min, max, sum); Console.ReadLine(); } } }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace _20170409_AOJ { class Program { static void Main(string[] args) { Console.ReadLine(); int[] arr = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); int min = int.MaxValue; int max = int.MinValue; long sum = 0; foreach (int v in arr) { min = Math.Min(min, v); max = Math.Max(max, v); sum += v; } Console.WriteLine("{0} {1} {2}", min, max, sum); Console.ReadLine(); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
159
2
using System; using System.Linq; namespace Sample1 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] numbers = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray(); ; int sum = 0; for (int i = 0; i < n; i += 1) { sum += numbers[i]; } Array.Sort(numbers); Console.WriteLine("{0} {1} {2}", numbers[0], numbers[n - 1], sum); } } }
using System; using System.Linq; namespace Sample1 { class Program { static void Main(string[] args) { long n = int.Parse(Console.ReadLine()); long[] numbers = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray(); ; long sum = 0; for (int i = 0; i < n; i += 1) { sum += numbers[i]; } Array.Sort(numbers); Console.WriteLine("{0} {1} {2}", numbers[0], numbers[n - 1], sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
135
8
using System; using System.Linq; namespace ITP1_4_D { class Program { static void Main(string[] args) { Console.ReadLine(); var nums = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).OrderBy(s => s); int min = nums.First(); int max = nums.Last(); long sum = nums.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
using System; using System.Linq; namespace ITP1_4_D { class Program { static void Main(string[] args) { Console.ReadLine(); var nums = Console.ReadLine() .Split(' ') .Select(s => long.Parse(s)) .OrderBy(s => s); var min = nums.First(); var max = nums.Last(); var sum = nums.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } } }
[["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 216, 0, 217]]
8
110
8
using System; using System.Linq; public class Hello { public static void Main() { string s; int num = int.MaxValue; while ((s = Console.ReadLine()) != null) { if (num == int.MaxValue) { num = int.Parse(s); } else { int[] numbers = new int[num]; numbers = s.Split(' ').Select(int.Parse).ToArray(); num = int.MaxValue; Console.WriteLine("{0} {1} {2}", numbers.Min(), numbers.Max(), numbers.Sum()); } } } }
using System; using System.Linq; public class Hello { public static void Main() { string s; int num = int.MaxValue; while ((s = Console.ReadLine()) != null) { if (num == int.MaxValue) { num = int.Parse(s); } else { long[] numbers = new long[num]; numbers = s.Split(' ').Select(long.Parse).ToArray(); num = int.MaxValue; Console.WriteLine("{0} {1} {2}", numbers.Min(), numbers.Max(), numbers.Sum()); } } } }
[["-", 75, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 75, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
135
6
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp13 { class Program { static void Main(string[] args) { string A = Console.ReadLine(); int a = int.Parse(A); var x = Console.ReadLine().Split(' '); var z = new List<int>(); for (int b = 0; b < a; b++) { var y = int.Parse(x[b]); z.Add(y); } z.Sort(); double v = z.Sum(); double w = z.Last(); double u = z.First(); Console.WriteLine("{0} {1} {2}", u, w, v); } } }
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp13 { class Program { static void Main(string[] args) { string A = Console.ReadLine(); int a = int.Parse(A); var x = Console.ReadLine().Split(' '); var z = new List<double>(); for (int b = 0; b < a; b++) { double y = double.Parse(x[b]); z.Add(y); } z.Sort(); double v = z.Sum(); double w = z.Last(); double u = z.First(); Console.WriteLine("{0} {1} {2}", u, w, v); } } }
[["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 8, 196, 0, 197, 0, 198, 39, 216, 0, 217], ["+", 0, 7, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199]]
8
164
6
using System; using System.Collections.Generic; class Program { static int Main(string[] args) { string v = Console.ReadLine(); int n = int.Parse(v); v = Console.ReadLine(); string[] vs = v.Split(' '); List<int> list = new List<int>(); int total = 0; for (int i = 0; i < n; i++) { list.Add(int.Parse(vs[i])); total += list[i]; } list.Sort(); Console.WriteLine( string.Format("{0} {1} {2}", list[0], list[n - 1], total)); return 0; } }
using System; using System.Collections.Generic; class Program { static int Main(string[] args) { string v = Console.ReadLine(); int n = int.Parse(v); v = Console.ReadLine(); string[] vs = v.Split(' '); List<int> list = new List<int>(); long total = 0; for (int i = 0; i < n; i++) { list.Add(int.Parse(vs[i])); total += list[i]; } list.Sort(); Console.WriteLine( string.Format("{0} {1} {2}", list[0], list[n - 1], total)); return 0; } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
160
2
using System; using System.Linq; class program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] str = new string[n]; int[] num = new int[n]; str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { num[i] = int.Parse(str[i]); } int min = num.Min(); int max = num.Max(); long sum = num.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } }
using System; using System.Linq; class program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] str = new string[n]; long[] num = new long[n]; str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { num[i] = int.Parse(str[i]); } long min = num.Min(); long max = num.Max(); long sum = num.Sum(); Console.WriteLine("{0} {1} {2}", min, max, sum); } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
143
8
using System.Linq; using System; public class hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var arr = new int[n]; string[] line = Console.ReadLine().Trim().Split(' '); for (int i = 0; i < n; i++) arr[i] = int.Parse(line[i]); Console.WriteLine("{0} {1} {2}", arr.Min(), arr.Max(), arr.Sum()); } }
using System.Linq; using System; public class hello { public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); var arr = new long[n]; string[] line = Console.ReadLine().Trim().Split(' '); for (int i = 0; i < n; i++) arr[i] = int.Parse(line[i]); Console.WriteLine("{0} {1} {2}", arr.Min(), arr.Max(), arr.Sum()); } }
[["-", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199]]
8
126
2
using System; using System.Linq; namespace Computation { class Min__Max_and_Sum { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var array = Console.ReadLine() .Split(' ') .Take(n) .Select(s => int.Parse(s)) .ToArray(); // var min = array[0]; // var max = array[0]; // var sum = 0; // for(int i = 0; i < n; i++) //{ // if (array[i] < min) min = array[i]; // if (array[i] > max) max = array[i]; // sum += array[i]; //} Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); // Console.WriteLine(min + " " + max + " " + sum); } } }
using System; using System.Linq; namespace Computation { class Min__Max_and_Sum { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var array = Console.ReadLine() .Split(' ') .Take(n) .Select(s => long.Parse(s)) .ToArray(); // var min = array[0]; // var max = array[0]; // var sum = 0; // for(int i = 0; i < n; i++) //{ // if (array[i] < min) min = array[i]; // if (array[i] > max) max = array[i]; // sum += array[i]; //} Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); // Console.WriteLine(min + " " + max + " " + sum); } } }
[["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
119
2
using System; using System.Linq; namespace Computation { class Min__Max_and_Sum { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var array = Console.ReadLine() .Split(' ') .Take(n) .Select(s => int.Parse(s)) .ToArray(); // var min = array[0]; // var max = array[0]; // var sum = 0; // for(int i = 0; i < n; i++) //{ // if (array[i] < min) min = array[i]; // if (array[i] > max) max = array[i]; // sum += array[i]; //} Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); // Console.WriteLine(min + " " + max + " " + sum); } } }
using System; using System.Linq; namespace Computation { class Min__Max_and_Sum { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); var array = Console.ReadLine() .Split(' ') .Take(n) .Select(s => long.Parse(s)) .ToArray(); Console.WriteLine(array.Min() + " " + array.Max() + " " + array.Sum()); } } }
[["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
119
2
using System; using System.Linq; namespace Number { class Program { static void Main(string[] args) { Console.ReadLine(); int[] i = Console.ReadLine().Split(' ').Select(e => int.Parse(e)).ToArray(); Console.WriteLine("{0} {1} {2}", i.Min(), i.Max(), i.Sum()); } } }
using System; using System.Linq; namespace Number { class Program { static void Main(string[] args) { Console.ReadLine(); long[] l = Console.ReadLine().Split(' ').Select(e => long.Parse(e)).ToArray(); Console.WriteLine("{0} {1} {2}", l.Min(), l.Max(), l.Sum()); } } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22]]
8
94
12
using System; public class Test { public static void Main() { string[] data; int max = -1000000, min = 1000000, sum = 0, x = 0; x = int.Parse(Console.ReadLine()); data = Console.ReadLine().Split(); for (int num = x - 1; num >= 0; num--) { if (max < int.Parse(data[num])) { max = int.Parse(data[num]); } if (min > int.Parse(data[num])) { min = int.Parse(data[num]); } sum += int.Parse(data[num]); } Console.WriteLine("{0} {1} {2}", min, max, sum); } }
using System; public class Test { public static void Main() { string[] data; int max = -1000000, min = 1000000, x = 0; long sum = 0; x = int.Parse(Console.ReadLine()); data = Console.ReadLine().Split(); for (int num = x - 1; num >= 0; num--) { if (max < int.Parse(data[num])) { max = int.Parse(data[num]); } if (min > int.Parse(data[num])) { min = int.Parse(data[num]); } sum += long.Parse(data[num]); } Console.WriteLine("{0} {1} {2}", min, max, sum); } }
[["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199]]
8
165
9
using System; using System.Collections.Generic; using System.Linq; public class MinMaxAndSum { //????????°?????´??°???????°????????????§??????????¨????????±??????? static void Main(string[] args) { /*---??£?¨???¨---*/ int total; string[] strNum; /*---??£?¨???¨---*/ /*?????????????????°??¨??´??°?????????*/ total = int.Parse(Console.ReadLine()); strNum = (Console.ReadLine().Split(' ')); /*int?????????????§????????????????*/ int[] intNum = strNum.Select(s => int.Parse(s)).ToArray(); Array.Sort(intNum); /*????°????????????§??????????¨??????¨???*/ Console.WriteLine("{0} {1} {2}", intNum[0], intNum[total - 1], intNum.Sum()); } }
using System; using System.Collections.Generic; using System.Linq; public class MinMaxAndSum { //????????°?????´??°???????°????????????§??????????¨????????±??????? static void Main(string[] args) { /*---??£?¨???¨---*/ int count; string[] strNum; /*---??£?¨???¨---*/ /*?????????????????°??¨??´??°?????????*/ count = int.Parse(Console.ReadLine()); strNum = (Console.ReadLine().Split(' ')); /*int?????????????§????????????????*/ long[] intNum = strNum.Select(s => long.Parse(s)).ToArray(); Array.Sort(intNum); /*????°????????????§??????????¨??????¨???*/ Console.WriteLine("{0} {1} {2}", intNum[0], intNum[count - 1], intNum.Sum()); } }
[["-", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["+", 8, 196, 0, 197, 0, 198, 0, 200, 141, 22], ["-", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 0, 195, 8, 196, 0, 1, 0, 11, 31, 22], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["-", 0, 204, 206, 207, 0, 28, 0, 16, 31, 22], ["+", 0, 204, 206, 207, 0, 28, 0, 16, 31, 22]]
8
132
10
using System; namespace ITP1_4_D { class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int min = 1000000, max = -1000000, sum = 0; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { int a = int.Parse(str[i]); if (a < min) min = a; if (a > max) max = a; sum += a; } Console.WriteLine(min + " " + max + " " + sum); } } }
using System; namespace ITP1_4_D { class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int min = 1000000, max = -1000000; long sum = 0; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i++) { int a = int.Parse(str[i]); if (a < min) min = a; if (a > max) max = a; sum += a; } Console.WriteLine(min + " " + max + " " + sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 0, 21], ["+", 8, 201, 0, 195, 8, 196, 0, 197, 0, 35], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
136
3
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // List<int> a = new List<int>(); int n = int.Parse(Console.ReadLine()); int[] a = new int[n]; int sum = 0; // List<int> b = new List<int>(); string[] s = Console.ReadLine().Split(' '); // int a = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { a[i] = int.Parse(s[i]); sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0], a[n - 1], sum); // Console.WriteLine(""); } }
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // List<int> a = new List<int>(); int n = int.Parse(Console.ReadLine()); long[] a = new long[n]; long sum = 0; // List<int> b = new List<int>(); string[] s = Console.ReadLine().Split(' '); // int a = int.Parse(Console.ReadLine()); for (int i = 0; i < n; i++) { a[i] = long.Parse(s[i]); sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0], a[n - 1], sum); // Console.WriteLine(""); } }
[["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["+", 0, 200, 0, 212, 0, 227, 39, 224, 39, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199]]
8
145
8
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] strAry = Console.ReadLine().Split(); int[] ary = new int[n]; for (int i = 0; i < n; i++) ary[i] = int.Parse(strAry[i]); int min = 0; int max = 0; int sum = ary[0]; for (int i = 1; i < n; i++) { sum += ary[i]; if (ary[i] < ary[min]) min = i; else if (ary[max] < ary[i]) max = i; } Console.WriteLine("{0} {1} {2}", ary[min], ary[max], sum); } }
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] strAry = Console.ReadLine().Split(); int[] ary = new int[n]; for (int i = 0; i < n; i++) ary[i] = int.Parse(strAry[i]); int min = 0; int max = 0; long sum = ary[0]; for (int i = 1; i < n; i++) { sum += ary[i]; if (ary[i] < ary[min]) min = i; else if (ary[max] < ary[i]) max = i; } Console.WriteLine("{0} {1} {2}", ary[min], ary[max], sum); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
178
2
using System; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int sumnum = 0; int Min = 1000000; int Max = -1000000; int inputnum = int.Parse(Console.ReadLine()); string[] objectdata = Console.ReadLine().Split(' '); for (int i = 0; i < inputnum; i++) { int castdata = int.Parse(objectdata[i]); if (Min > castdata) Min = castdata; if (Max < castdata) Max = castdata; sumnum += castdata; } Console.WriteLine("{0} {1} {2}", Min, Max, sumnum); } } }
using System; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { double sumnum = 0; int Min = 1000000; int Max = -1000000; int inputnum = int.Parse(Console.ReadLine()); string[] objectdata = Console.ReadLine().Split(' '); for (int i = 0; i < inputnum; i++) { int castdata = int.Parse(objectdata[i]); if (Min > castdata) Min = castdata; if (Max < castdata) Max = castdata; sumnum += castdata; } Console.WriteLine("{0} {1} {2}", Min, Max, sumnum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
143
2
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var inputlist = new List<int>(); Console.ReadLine(); string inputstring = Console.ReadLine(); string[] strArray = inputstring.Split(' '); foreach (string str in strArray) { inputlist.Add(int.Parse(str)); } Console.Write(inputlist.Min() + " "); Console.Write(inputlist.Max() + " "); Console.WriteLine(inputlist.Sum()); } }
using System; using System.Collections.Generic; using System.Linq; class Program { static void Main(string[] args) { var inputlist = new List<long>(); Console.ReadLine(); string inputstring = Console.ReadLine(); string[] strArray = inputstring.Split(' '); foreach (string str in strArray) { inputlist.Add(int.Parse(str)); } Console.Write(inputlist.Min() + " "); Console.Write(inputlist.Max() + " "); Console.WriteLine(inputlist.Sum()); } }
[["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199]]
8
132
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp3 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int sum = 0; int[] ai = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); Array.Sort(ai); Console.Write("{0} {1} ", ai[0], ai[n - 1]); for (int i = 0; i < n; i++) { sum = sum + ai[i]; } Console.WriteLine(sum); Console.ReadLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp3 { class Program { static void Main(string[] args) { long n = int.Parse(Console.ReadLine()); long sum = 0; long[] ai = Console.ReadLine().Split(' ').Select(long.Parse).ToArray(); Array.Sort(ai); Console.Write("{0} {1} ", ai[0], ai[n - 1]); for (int i = 0; i < n; i++) { sum = sum + ai[i]; } Console.WriteLine(sum); Console.ReadLine(); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["-", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["+", 8, 196, 0, 197, 0, 198, 39, 224, 39, 199], ["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
153
8
using System; // using System.Collections; // using System.Collections.Generic; using System.Linq; namespace problem { class Test { static void Main() { int i = int.Parse(Console.ReadLine()); int[] list = new int[i]; list = Console.ReadLine().Split().Select(int.Parse).ToArray(); int sum = 0; for (int x = 0; x < i; x++) { sum += list[x]; } Console.WriteLine("{0} {1} {2}", list.Min(), list.Max(), sum); } } }
using System; // using System.Collections; // using System.Collections.Generic; using System.Linq; namespace problem { class Test { static void Main() { int i = int.Parse(Console.ReadLine()); int[] list = new int[i]; list = Console.ReadLine().Split().Select(int.Parse).ToArray(); long sum = 0; for (int x = 0; x < i; x++) { sum += (long)list[x]; } Console.WriteLine("{0} {1} {2}", list.Min(), list.Max(), sum); } } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 24], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 74, 0, 25]]
8
124
5
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); int min = 0, max = 0, sum = 0; int a; for (int i = 0; i < n; i++) { a = int.Parse(s[i]); if (i == 0) { min = a; max = a; } else { if (a < min) min = a; if (a > max) max = a; } sum += a; } Console.WriteLine(string.Format("{0} {1} {2}", min, max, sum)); } }
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); string[] s = Console.ReadLine().Split(' '); decimal min = 0, max = 0, sum = 0; decimal a; for (int i = 0; i < n; i++) { a = int.Parse(s[i]); if (i == 0) { min = a; max = a; } else { if (a < min) min = a; if (a > max) max = a; } sum += a; } Console.WriteLine(string.Format("{0} {1} {2}", min, max, sum)); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
153
4
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp_ITP1_4_D_2 { class Program { static void Main(string[] args) { var inputLine1 = Console.ReadLine(); var inputLine2 = Console.ReadLine(); string[] inputValue = inputLine2.Split(' '); var inputData = new List<int>() {}; for (int i = 0; i < int.Parse(inputLine1); i++) { inputData.Add(int.Parse(inputValue[i])); } Console.WriteLine("{0} {1} {2}", inputData.Min(), inputData.Max(), inputData.Sum()); } } }
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp_ITP1_4_D_2 { class Program { static void Main(string[] args) { var inputLine1 = Console.ReadLine(); var inputLine2 = Console.ReadLine(); string[] inputValue = inputLine2.Split(' '); var inputData = new List<long>() {}; for (int i = 0; i < int.Parse(inputLine1); i++) { inputData.Add(int.Parse(inputValue[i])); } Console.WriteLine("{0} {1} {2}", inputData.Min(), inputData.Max(), inputData.Sum()); } } }
[["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199]]
8
142
2
using System; class Program { static void Main(string[] args) { // int i = 0; int n; int min = 0; int max = 0; int total = 0; string num1 = Console.ReadLine(); n = int.Parse(num1); string[] num2 = Console.ReadLine().Split(' '); int[] array = new int[n]; for (int i = 0; i < n; i++) { array[i] = int.Parse(num2[i]); } foreach (int ai in array) { total += ai; if (min > ai) { min = ai; } if (max < ai) { max = ai; } } Console.WriteLine(min + " " + max + " " + total); } }
using System; class Program { static void Main(string[] args) { int n; int min = 1000000; int max = -1000000; long total = 0; string num1 = Console.ReadLine(); n = int.Parse(num1); string[] num2 = Console.ReadLine().Split(' '); int[] array = new int[n]; for (int i = 0; i < n; i++) { array[i] = int.Parse(num2[i]); } foreach (int ai in array) { total += ai; if (min > ai) { min = ai; } if (max < ai) { max = ai; } } Console.WriteLine(min + " " + max + " " + total); } }
[["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 33], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
171
7
using System; using System.Linq; using System.Collections.Generic; class Max_and_Min_and_Sum { public static void Main() { int n = int.Parse(Console.ReadLine()); List<int> list = new List<int>(n); string[] s = Console.ReadLine().Split(); List<string> stringList = new List<string>(); stringList.AddRange(s); list = stringList.ConvertAll(x => int.Parse(x)); Console.WriteLine("{0} {1} {2}", list.Min(), list.Max(), list.Sum()); } }
using System; using System.Linq; using System.Collections.Generic; class Max_and_Min_and_Sum { public static void Main() { int n = int.Parse(Console.ReadLine()); List<long> list = new List<long>(n); string[] s = Console.ReadLine().Split(); List<string> stringList = new List<string>(); stringList.AddRange(s); list = stringList.ConvertAll(x => long.Parse(x)); Console.WriteLine("{0} {1} {2}", list.Min(), list.Max(), list.Sum()); } }
[["-", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["+", 0, 197, 0, 198, 39, 236, 237, 238, 0, 199], ["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
8
135
6
using System; using System.Linq; class Problem { public static void Main() { Console.ReadLine(); var data = Console.ReadLine().Split().Select(int.Parse).ToArray(); Console.Write(data.Min() + " "); Console.Write(data.Max() + " "); Console.WriteLine(data.Sum()); } }
using System; using System.Linq; class Problem { public static void Main() { Console.ReadLine(); var data = Console.ReadLine().Split().Select(long.Parse).ToArray(); Console.Write(data.Min() + " "); Console.Write(data.Max() + " "); Console.WriteLine(data.Sum()); } }
[["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
8
91
2
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] a = new int[n]; string input = Console.ReadLine(); string[] input_split = input.Split(' '); for (int i = 0; i < a.Length; ++i) { a[i] = int.Parse(input_split[i]); } int sum = 0; for (int i = 0; i < a.Length; i++) { sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0], a[a.Length - 1], sum); } }
using System; class Program { static void Main() { int n = int.Parse(Console.ReadLine()); int[] a = new int[n]; string input = Console.ReadLine(); string[] input_split = input.Split(' '); for (int i = 0; i < a.Length; ++i) { a[i] = int.Parse(input_split[i]); } long sum = 0; for (int i = 0; i < a.Length; i++) { sum += a[i]; } Array.Sort(a); Console.WriteLine("{0} {1} {2}", a[0], a[a.Length - 1], sum); } }
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
8
157
2
using System; namespace ITP1_5_A { class Program { static void Main(string[] args) { while (true) { string[] x = Console.ReadLine().Split(' '); int h = int.Parse(x[0]); int w = int.Parse(x[1]); if (h == 0 && w == 0) break; for (int j = 0; j < h; j++) { for (int i = 0; i < w; i++) { Console.WriteLine("#"); } Console.WriteLine(); } Console.WriteLine(); } } } }
using System; namespace ITP1_5_A { class Program { static void Main(string[] args) { while (true) { string[] x = Console.ReadLine().Split(' '); int h = int.Parse(x[0]); int w = int.Parse(x[1]); if (h == 0 && w == 0) break; for (int j = 0; j < h; j++) { for (int i = 0; i < w; i++) { Console.Write("#"); } Console.WriteLine(); } Console.WriteLine(); } } } }
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
8
137
2
using System; class program { public static void Main() { while (true) { var str = Console.ReadLine().Split(' '); var H = int.Parse(str[0]); var W = int.Parse(str[1]); if (H == 0 && W == 0) break; for (int height = 0; height < H; height++) { for (int width = 0; width < W; width++) { Console.Write('#'); } Console.WriteLine(); } } Console.WriteLine(); } }
using System; class program { public static void Main() { while (true) { var str = Console.ReadLine().Split(' '); var H = int.Parse(str[0]); var W = int.Parse(str[1]); if (H == 0 && W == 0) break; for (int height = 0; height < H; height++) { for (int width = 0; width < W; width++) { Console.Write('#'); } Console.WriteLine(); } Console.WriteLine(); } } }
[["-", 0, 195, 8, 196, 0, 52, 8, 196, 0, 46], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 46]]
8
128
2
using System; using System.Linq; namespace Aizu { class OnlineJudge { public static void Main() { int[] input; while (((input = Console.ReadLine() .Split() .Select(p => int.Parse(p)) .ToArray())[0] | input[1]) != 0) { for (int i = 0; i < input[0]; ++i) { Console.WriteLine(new String('#', input[1])); } } } } }
using System; using System.Linq; namespace Aizu { class OnlineJudge { public static void Main() { int[] input; while (((input = Console.ReadLine() .Split() .Select(p => int.Parse(p)) .ToArray())[0] | input[1]) != 0) { for (int i = 0; i < input[0]; ++i) { Console.WriteLine(new String('#', input[1])); } Console.WriteLine(); } } } }
[["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]]
8
112
6
using System; class Program { private static int Main() { while (true) { var input = Console.ReadLine(); var values = input.Split(' '); int H = int.Parse(values[0]); int W = int.Parse(values[1]); if (H == 0 && W == 0) { break; } var output = new string('#', W); for (int i = 0; i < H; ++i) { Console.WriteLine(output); } } return 0; } }
using System; class Program { private static int Main() { while (true) { var input = Console.ReadLine(); var values = input.Split(' '); int H = int.Parse(values[0]); int W = int.Parse(values[1]); if (H == 0 && W == 0) { break; } var output = new string('#', W); for (int i = 0; i < H; ++i) { Console.WriteLine(output); } Console.WriteLine(); } return 0; } }
[["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 196, 0, 52, 8, 196, 0, 1, 0, 35]]
8
121
6
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { while (true) { string[] str = Console.ReadLine().Split(' '); int tate = int.Parse(str[0]); int yoko = int.Parse(str[1]); if ((tate == 0) && (yoko == 0)) { break; } for (int i = 0; i < tate; ++i) { for (int j = 0; j < yoko; ++j) { Console.Write("#"); } Console.WriteLine(); } Console.WriteLine("\n"); } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { while (true) { string[] str = Console.ReadLine().Split(' '); int tate = int.Parse(str[0]); int yoko = int.Parse(str[1]); if ((tate == 0) && (yoko == 0)) { break; } for (int i = 0; i < tate; ++i) { for (int j = 0; j < yoko; ++j) { Console.Write("#"); } Console.WriteLine(); } Console.WriteLine(); } } } }
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 62], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 44]]
8
163
3
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Structured_Programming { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); List<int> temp = new List<int>(); for (int i = 1; i <= num; i++) { if (i % 3 == 0) { temp.Add(i); } else { for (int j = i; j > 0; j /= 10) { if (j % 10 == 3) { temp.Add(i); } } } } foreach (int item in temp) { Console.Write(" " + item); } Console.WriteLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Structured_Programming { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); List<int> temp = new List<int>(); for (int i = 1; i <= num; i++) { if (i % 3 == 0) { temp.Add(i); } else { for (int j = i; j > 0; j /= 10) { if (j % 10 == 3) { temp.Add(i); break; } } } } foreach (int item in temp) { Console.Write(" " + item); } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
170
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ITP1 { class ITP1_5_D { static void Main(string[] args) { int n; n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); } else { while (x > 10) { if (x % 10 == 3) { Console.Write(" " + i); } x /= 10; if (x == 3) { Console.Write(" " + i); } } } } Console.WriteLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ITP1 { class ITP1_5_D { static void Main(string[] args) { int n; n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); } else { while (x > 10) { if (x % 10 == 3) { Console.Write(" " + i); break; } x /= 10; if (x == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35]]
8
165
4
using System; using System.Linq; namespace AOJ_Practice { class Program { static void Main(string[] args) { int input = int.Parse(Console.ReadLine()); for (int i = 1; i <= input; ++i) { if (i % 3 == 0) { Console.Write($" {i}"); } for (int j = i; j > 0; j /= 10) { if (j % 10 == 3) { Console.Write($" {i}"); break; } } } Console.WriteLine(); } } }
using System; using System.Linq; namespace AOJ_Practice { class Program { static void Main(string[] args) { int input = int.Parse(Console.ReadLine()); for (int i = 1; i <= input; ++i) { if (i % 3 == 0) { Console.Write($" {i}"); continue; } for (int j = i; j > 0; j /= 10) { if (j % 10 == 3) { Console.Write($" {i}"); break; } } } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 35]]
8
126
2
using System; namespace Structured { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" {0}", x); continue; } for (; x != 0; x /= 10) { if (x % 10 == 3) { Console.Write(" {0}", x); break; } } } Console.Write("\n"); } } }
using System; namespace Structured { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" {0}", i); continue; } for (; x != 0; x /= 10) { if (x % 10 == 3) { Console.Write(" {0}", i); break; } } } Console.Write("\n"); } } }
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22]]
8
126
4
using System; namespace Test { class MainClass { public static void Main(string[] args) { var input = Console.ReadLine(); var num = int.Parse(input); for (int i = 3; i <= num; i++) { var x = i; if (x % 3 == 0) { Console.Write(" {0}", i); continue; } while (x == 0) { if (x % 10 == 3) { Console.Write(" {0}", i); break; } x /= 10; } } Console.WriteLine(); } } }
using System; namespace Test { class MainClass { public static void Main(string[] args) { var input = Console.ReadLine(); var num = int.Parse(input); for (int i = 1; i <= num; i++) { var x = i; if (x % 3 == 0) { Console.Write(" {0}", i); continue; } while (0 != x) { if (x % 10 == 3) { Console.Write(" {0}", i); break; } x /= 10; } } Console.WriteLine(); } } }
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 7, 8, 196, 0, 52, 15, 16, 31, 22], ["-", 0, 7, 8, 196, 0, 52, 15, 16, 17, 60], ["+", 0, 7, 8, 196, 0, 52, 15, 16, 17, 79], ["+", 0, 7, 8, 196, 0, 52, 15, 16, 12, 22]]
8
127
6
using System; namespace Aizu { class OnlineJudge { public static void Main() { int input = int.Parse(Console.ReadLine()); for (int i = 1; i < input; ++i) { if (i % 3 == 0 || i.ToString().Contains("3")) { Console.Write(" {0}", i); } } Console.WriteLine(); } } }
using System; namespace Aizu { class OnlineJudge { public static void Main() { int input = int.Parse(Console.ReadLine()); for (int i = 1; i <= input; ++i) { if (i % 3 == 0 || i.ToString().Contains("3")) { Console.Write(" {0}", i); } } Console.WriteLine(); } } }
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
8
89
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_5D { class Program { static void Main(string[] args) { string str = Console.ReadLine(); int input = int.Parse(str); call(input); } private static void call(int input) { int i = 1; while (i <= input) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); } else { while (x != 0) { if (x % 10 == 3) { Console.Write(" " + i); } x /= 10; } } ++i; } Console.WriteLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ITP1_5D { class Program { static void Main(string[] args) { string str = Console.ReadLine(); int input = int.Parse(str); call(input); } private static void call(int input) { int i = 1; while (i <= input) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); } else { while (x != 0) { if (x % 10 == 3) { Console.Write(" " + i); break; } x /= 10; } } ++i; } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
157
2
using System; class Program { static void Main() { string S = ""; int D = int.Parse(Console.ReadLine()); for (int i = 1; i <= D; i++) { int x = i; if (x % 3 == 0) { S += " " + i; } else { while (x != 0) { if (x % 10 == 3) { S += " " + i; } x /= 10; } } } Console.WriteLine(S); } }
using System; class Program { static void Main() { string S = ""; int D = int.Parse(Console.ReadLine()); for (int i = 1; i <= D; i++) { int x = i; if (x % 3 == 0) { S += " " + i; } else { while (x != 0) { if (x % 10 == 3) { S += " " + i; break; } x /= 10; } } } Console.WriteLine(S); } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
113
2
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int n = int.Parse(s); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); break; } else { for (int x = 0; x > 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); break; } } } } Console.Write("\n"); } } }
using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { string s = Console.ReadLine(); int n = int.Parse(s); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); } else { for (int x = i; x > 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); break; } } } } Console.Write("\n"); } } }
[["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35], ["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 22]]
8
144
4
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int a = int.Parse(s[0]); for (int i = 1; i <= a; i++) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); } for (; x != 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); } } } Console.WriteLine(""); } } }
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string[] s = Console.ReadLine().Split(' '); int a = int.Parse(s[0]); for (int i = 1; i <= a; i++) { int x = i; if (x % 3 == 0) { Console.Write(" " + i); continue; } for (; x != 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); break; } } } Console.WriteLine(""); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
8
137
4
using System; namespace ConsoleApplication37 { class Program { static void Main(string[] args) { String s = Console.ReadLine(); String[] ss = s.Split(' '); int n = int.Parse(ss[0]); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); } else { for (int x = i; x > 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); } } } } Console.WriteLine(""); } } }
using System; namespace ConsoleApplication37 { class Program { static void Main(string[] args) { String s = Console.ReadLine(); String[] ss = s.Split(' '); int n = int.Parse(ss[0]); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); } else { for (int x = i; x > 0; x /= 10) { if (x % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35], ["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 62]]
8
144
4
using System; public class Test { public static void Main() { var n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if ((i % 3) == 0) { Console.Write(" " + i); } else { int x = i; while (x != 0) { if ((x % 10) == 3) { Console.Write(" " + i); } x /= 10; } } } Console.WriteLine(); } }
using System; public class Test { public static void Main() { var n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if ((i % 3) == 0) { Console.Write(" " + i); } else { int x = i; while (x != 0) { if ((x % 10) == 3) { Console.Write(" " + i); break; } x /= 10; } } } Console.WriteLine(); } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
118
2
using System; class Program { static void Main(string[] args) { Input CInput = new Input(); int input = 0; // int[] input = new int[(int)Input.Define.MAX_ArraySize]; // int[,] input = new int[(int)Input.Define.MAX_ArraySize, // (int)Input.Define.ArraySize2d]; int num = 0; input = CInput.Line1_int(); // input = CInput.Multiline_int(' ', 2, ref num); for (int i = 1; i <= input; i++) { var x = i; if (x % 3 == 0) { System.Console.Write(" {0}", i); } else { while (true) { if (x % 10 == 3) { System.Console.Write(" {0}", i); } x /= 10; if (x == 0) break; } } } System.Console.WriteLine(); } } class Input { public enum Define { MAX_ArraySize = 1000000, ArraySize2d = 2, // 2?¬?????????????[][?] ??????? } public string Line1_string() { return Console.ReadLine(); } public int Line1_int() { var input = Console.ReadLine(); return int.Parse(input); } public double Line1_double() { var input = Console.ReadLine(); return double.Parse(input); } public int[] Line1_int(int chr, int num) { var input = Console.ReadLine(); var split = input.Split(' '); int[] spliti = new int[100]; for (int i = 0; i < num; i++) { spliti[i] = int.Parse(split[i]); } return spliti; } public int[] Multiline_int(ref int datanum) { int i = 0; int[] data = new int[(int)Input.Define.MAX_ArraySize]; while (true) { var input = Console.ReadLine(); var value = int.Parse(input); if (value == 0) break; data[i] = value; i++; } datanum = i; return data; } /// <summary> /// ?????°??????int?????????????????????????????? /// </summary> /// <param name="chr">???????????????</param> /// <param name="num">?????????????????????????????°</param> /// <param name="datanum">??????????????????????????°</param> /// <returns></returns> public int[,] Multiline_int(int chr, int num, ref int datanum) { int i = 0; int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d]; while (true) { var input = Console.ReadLine(); var split = input.Split(' '); int[] spliti = new int[100]; for (int j = 0; j < num; j++) { spliti[j] = int.Parse(split[j]); } if (spliti[0] == 0 && spliti[1] == 0) break; data[i, 0] = spliti[0]; data[i, 1] = spliti[1]; i++; } datanum = i; return data; } }
using System; class Program { static void Main(string[] args) { Input CInput = new Input(); int input = 0; // int[] input = new int[(int)Input.Define.MAX_ArraySize]; // int[,] input = new int[(int)Input.Define.MAX_ArraySize, // (int)Input.Define.ArraySize2d]; int num = 0; input = CInput.Line1_int(); // input = CInput.Multiline_int(' ', 2, ref num); for (int i = 1; i <= input; i++) { var x = i; if (x % 3 == 0) { System.Console.Write(" {0}", i); } else { while (true) { if (x % 10 == 3) { System.Console.Write(" {0}", i); break; } x /= 10; if (x == 0) break; } } } System.Console.WriteLine(); } } class Input { public enum Define { MAX_ArraySize = 1000000, ArraySize2d = 2, // 2?¬?????????????[][?] ??????? } public string Line1_string() { return Console.ReadLine(); } public int Line1_int() { var input = Console.ReadLine(); return int.Parse(input); } public double Line1_double() { var input = Console.ReadLine(); return double.Parse(input); } public int[] Line1_int(int chr, int num) { var input = Console.ReadLine(); var split = input.Split(' '); int[] spliti = new int[100]; for (int i = 0; i < num; i++) { spliti[i] = int.Parse(split[i]); } return spliti; } public int[] Multiline_int(ref int datanum) { int i = 0; int[] data = new int[(int)Input.Define.MAX_ArraySize]; while (true) { var input = Console.ReadLine(); var value = int.Parse(input); if (value == 0) break; data[i] = value; i++; } datanum = i; return data; } /// <summary> /// ?????°??????int?????????????????????????????? /// </summary> /// <param name="chr">???????????????</param> /// <param name="num">?????????????????????????????°</param> /// <param name="datanum">??????????????????????????°</param> /// <returns></returns> public int[,] Multiline_int(int chr, int num, ref int datanum) { int i = 0; int[,] data = new int[(int)Input.Define.MAX_ArraySize, (int)Input.Define.ArraySize2d]; while (true) { var input = Console.ReadLine(); var split = input.Split(' '); int[] spliti = new int[100]; for (int j = 0; j < num; j++) { spliti[j] = int.Parse(split[j]); } if (spliti[0] == 0 && spliti[1] == 0) break; data[i, 0] = spliti[0]; data[i, 1] = spliti[1]; i++; } datanum = i; return data; } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
564
2
using System; namespace ITP1 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); } else if (i % 10 == 3) { Console.Write(" " + i); } else { int k = i; while (true) { k /= 10; if (k < 3) break; if (k % 10 == 3) { Console.Write(" " + i); } } } } Console.WriteLine(); } } }
using System; namespace ITP1 { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if (i % 3 == 0) { Console.Write(" " + i); } else if (i % 10 == 3) { Console.Write(" " + i); } else { int k = i; while (true) { k /= 10; if (k < 3) break; if (k % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
148
2
using System; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" {0}", x); } else { while (x != 0) { if (x % 10 == 3) { Console.Write(" {0}", x); } x /= 10; } } } Console.Write("\n"); } } }
using System; namespace Project { class MainClass { public static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { int x = i; if (x % 3 == 0) { Console.Write(" {0}", i); } else { while (x != 0) { if (x % 10 == 3) { Console.Write(" {0}", i); break; } x /= 10; } } } Console.Write("\n"); } } }
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
8
124
6
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); for (int i = 3; i <= num; i++) { if (i % 3 == 0) { Console.Write(" " + i); continue; } else if (i % 10 == 3) Console.Write(" " + i); else { int j = i; while (true) { j /= 10; if (j == 0) break; else if (j % 10 == 3) Console.Write(" " + i); } } } Console.WriteLine(); } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); for (int i = 3; i <= num; i++) { if (i % 3 == 0) { Console.Write(" " + i); continue; } else if (i % 10 == 3) Console.Write(" " + i); else { int j = i; while (true) { j /= 10; if (j == 0) break; else if (j % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
[["+", 8, 196, 0, 57, 75, 57, 64, 196, 0, 45], ["+", 0, 57, 75, 57, 64, 196, 0, 1, 0, 35], ["+", 0, 57, 75, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 75, 57, 64, 196, 0, 46]]
8
169
4
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); int x = 0; int y = 0; for (int i = 1; i <= n; i++) { x = i; while (x > 10) { x /= 10; if (x % 10 == 3) { y = 99; break; } } if (i % 3 == 0 || i % 10 == 3 || y == 99) { Console.Write(" " + i); } } Console.WriteLine(); } }
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); int x = 0; int y = 0; for (int i = 1; i <= n; i++) { x = i; while (x > 10) { x /= 10; if (x % 10 == 3) { y = 99; break; } } if (i % 3 == 0 | i % 10 == 3 | y == 99) { y = 0; Console.Write(" " + i); } } Console.WriteLine(); } }
[["-", 8, 196, 0, 57, 15, 16, 31, 16, 17, 106], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 139], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 106], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 139], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 31, 22], ["+", 64, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 0, 57, 64, 196, 0, 1, 0, 11, 12, 203], ["+", 8, 196, 0, 57, 64, 196, 0, 1, 0, 35]]
8
125
8
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); int x = 0; for (int i = 1; i <= n; i++) { x = i; if (i % 3 == 0 | i % 10 == 3) { Console.Write(" " + i); } else { while (x > 10) { x /= 10; if (x % 10 == 3) { Console.Write(" " + i); break; } } } Console.WriteLine(); } } }
using System; public class Class1 { public static void Main() { int n = int.Parse(Console.ReadLine()); int x = 0; for (int i = 1; i <= n; i++) { x = i; if (i % 3 == 0 | i % 10 == 3) { Console.Write(" " + i); } else { while (x > 10) { x /= 10; if (x % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } }
[["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46]]
8
126
2
using System; using System.Collections.Generic; class program { static void Main() { int n; n = int.Parse(Console.ReadLine()); call(n); } static void call(int n) { int i = 1; while (i <= n) { int x = i; if ((x % 3 == 0) || (x % 10 == 3)) { Console.Write(" {0}", i); i++; } else { while (x != 0) { x /= 10; if (x % 10 == 3) { Console.Write(" {0}", i); } } i++; } } Console.WriteLine(); } }
using System; using System.Collections.Generic; class program { static void Main() { int n; n = int.Parse(Console.ReadLine()); call(n); } static void call(int n) { int i = 1; while (i <= n) { int x = i; if ((x % 3 == 0) || (x % 10 == 3)) { Console.Write(" {0}", i); i++; } else { while (x != 0) { x /= 10; if (x % 10 == 3) { Console.Write(" {0}", i); break; } } i++; } } Console.WriteLine(); } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
148
2
using System; namespace _1_5_D { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int f = 0; for (int i = 1; i < n; i += 1) { f = i; if (i % 3 == 0 || i % 10 == 3) { Console.Write(" " + i); } else { while (f > 10) { f /= 10; if (f % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
using System; namespace _1_5_D { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int f = 0; for (int i = 1; i <= n; i++) { f = i; if (i % 3 == 0 | i % 10 == 3) { Console.Write(" " + i); } else { while (f > 10) { f /= 10; if (f % 10 == 3) { Console.Write(" " + i); break; } } } } Console.WriteLine(); } } }
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["-", 8, 196, 0, 7, 26, 11, 0, 202, 0, 107], ["-", 0, 195, 8, 196, 0, 7, 26, 11, 12, 203], ["+", 0, 195, 8, 196, 0, 7, 26, 223, 0, 29], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 17, 106], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 17, 139]]
8
133
7
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // 3 ????????°????????? 3 ???????????°?????¨??? //?????°??£?¨? int x = int.Parse(Console.ReadLine()); //??£??\?????° int max = 0; var data = new List<int>(); //?????°list while (x >= 3) { // 3????????°?????? if (x % 3 == 0) { data.Add(x); } // 3???????????°?????? else { if (x % 10 == 3) { data.Add(x); } else { for (int i = 100; i <= 10000; i *= 10) { if (x % i / (i / 10) == 3) { data.Add(x); } } } } x -= 1; } max = data[0]; data.Sort(); //???????????? foreach (int i in data) { if (max == i) { Console.WriteLine(" {0}", i); } else { Console.Write(" {0}", i); } } Console.Read(); } }
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // 3 ????????°????????? 3 ???????????°?????¨??? //?????°??£?¨? int x = int.Parse(Console.ReadLine()); //??£??\?????° int max = 0; var data = new List<int>(); //?????°list while (x >= 3) { // 3????????°?????? if (x % 3 == 0) { data.Add(x); } // 3???????????°?????? else { if (x % 10 == 3) { data.Add(x); } else { for (int i = 100; i <= 10000; i *= 10) { if (x % i / (i / 10) == 3) { data.Add(x); break; } } } } x -= 1; } max = data[0]; data.Sort(); //???????????? foreach (int i in data) { if (max == i) { Console.WriteLine(" {0}", i); } else { Console.Write(" {0}", i); } } Console.Read(); } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
215
2
using System; using System.IO; namespace AizuOnline { internal class Program { private static void Main(string[] args) { var x = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i <= x; i++) { if (i % 3 == 0) { Console.Write(" " + i); continue; } var p = i; while (true) { if (p % 10 == 3) { Console.Write(" " + i); } p /= 10; if (p == 0) { break; } } } Console.WriteLine(); Console.ReadLine(); } } }
using System; using System.IO; namespace AizuOnline { internal class Program { private static void Main(string[] args) { var x = Convert.ToInt32(Console.ReadLine()); for (int i = 1; i <= x; i++) { if (i % 3 == 0) { Console.Write(" " + i); continue; } var p = i; while (true) { if (p % 10 == 3) { Console.Write(" " + i); break; } p /= 10; if (p == 0) { break; } } } Console.WriteLine(); Console.ReadLine(); } } }
[["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 35]]
8
140
2
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // long[] a = new long[n]; // string[] s = Console.ReadLine().Split(' '); int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if (i % 3 == 0 || i % 10 == 3) { Console.Write(" {0}", i); continue; } int x = i; while (x > 0) { x = x / 10; if (x % 10 == 3) { Console.Write(" {0}", i); continue; } } } Console.WriteLine(""); } }
using System; using System.Collections.Generic; class Program { static void Main(string[] args) { // long[] a = new long[n]; // string[] s = Console.ReadLine().Split(' '); int n = int.Parse(Console.ReadLine()); for (int i = 1; i <= n; i++) { if (i % 3 == 0 || i % 10 == 3) { Console.Write(" {0}", i); continue; } int x = i; while (x > 0) { x = x / 10; if (x % 10 == 3) { Console.Write(" {0}", i); break; } } } Console.WriteLine(""); } }
[["-", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
8
136
2
using System; namespace ReversingNumbers { class MainClass { public static void Main(string[] args) { string input = Console.ReadLine(); char[] CharSeparators = new char[] { ' ' }; string[] array = input.Split(CharSeparators); Array.Reverse(array); Console.WriteLine(string.Join(" ", array)); } } }
using System; namespace ReversingNumbers { class MainClass { public static void Main(string[] args) { Console.ReadLine(); string input = Console.ReadLine(); char[] CharSeparators = new char[] { ' ' }; string[] array = input.Split(CharSeparators); Array.Reverse(array); Console.WriteLine(string.Join(" ", array)); } } }
[["+", 8, 196, 0, 1, 0, 213, 63, 214, 205, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 25], ["+", 8, 201, 0, 195, 8, 196, 0, 1, 0, 35]]
8
82
6
using System; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string[] array = Console.ReadLine().Split(' '); Array.Reverse(array); for (int i = 0; i < count; i++) { if (i + 1 == count) { Console.Write(array[i]); } else { Console.Write(array[i]); } } Console.WriteLine(); } } }
using System; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { int count = int.Parse(Console.ReadLine()); string[] array = Console.ReadLine().Split(' '); Array.Reverse(array); for (int i = 0; i < count; i++) { if (i + 1 == count) { Console.Write(array[i]); } else { Console.Write(array[i] + " "); } } Console.WriteLine(); } } }
[["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 72], ["+", 3, 4, 0, 28, 0, 16, 12, 5, 0, 62], ["+", 3, 4, 0, 28, 0, 16, 12, 5, 0, 222]]
8
116
4
using System; namespace _1_6_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] hoge = new int[n]; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i += 1) { hoge[i] = int.Parse(str[i]); } Array.Reverse(hoge); for (int i = 0; i < n; i += 1) { if (i == 0) Console.Write(hoge[i]); else { Console.Write(" "); Console.Write(hoge[i]); } Console.Write("\n"); } } } }
using System; namespace _1_6_A { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); int[] hoge = new int[n]; string[] str = Console.ReadLine().Split(' '); for (int i = 0; i < n; i += 1) { hoge[i] = int.Parse(str[i]); } Array.Reverse(hoge); for (int i = 0; i < n; i += 1) { if (i == 0) Console.Write(hoge[i]); else { Console.Write(" "); Console.Write(hoge[i]); } } Console.Write("\n"); } } }
[["+", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 195, 8, 196, 0, 7, 8, 196, 0, 46]]
8
168
2
using System; class Program { static void Main() { Console.ReadLine(); string inStr = Console.ReadLine(); string[] arys = inStr.Split(' '); string result = ""; for (int i = arys.Length - 1; i >= 0; i--) { result = arys[i] + " "; } Console.WriteLine(result.TrimEnd()); } }
using System; class Program { static void Main() { Console.ReadLine(); string inStr = Console.ReadLine(); string[] arys = inStr.Split(' '); string result = ""; for (int i = arys.Length - 1; i >= 0; i--) { result = result + arys[i] + " "; } Console.WriteLine(result.TrimEnd()); } }
[["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72]]
8
91
2
using System; using System.Linq; class Problem { public static void Main() { Console.ReadLine(); var data = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Reverse(data); for (var i = 0; i < data.Length; Console.Write(++i != data.Length ? " " : "\n")) Console.Write(data); } }
using System; using System.Linq; class Problem { public static void Main() { Console.ReadLine(); var data = Console.ReadLine().Split().Select(int.Parse).ToArray(); Array.Reverse(data); for (var i = 0; i < data.Length; Console.Write(++i != data.Length ? " " : "\n")) Console.Write(data[i]); } }
[["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 70], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 22], ["+", 3, 4, 0, 28, 0, 204, 206, 207, 0, 73]]
8
97
3
using System; class Program { static void Main() { bool[] A = new bool[52]; int D = int.Parse(Console.ReadLine()); for (int i = 0; i < D; i++) { string[] sD = Console.ReadLine().Split(' '); if (sD[0] == "S") { A[int.Parse(sD[1]) - 1] = true; } if (sD[0] == "H") { A[int.Parse(sD[1]) + 12] = true; } if (sD[0] == "C") { A[int.Parse(sD[1]) + 25] = true; } if (sD[0] == "D") { A[int.Parse(sD[1]) + 38] = true; } } for (int i = 0; i < A.Length; i++) { if (!A[i]) { if (i < 13) { Console.WriteLine("{0} {0}", "S", i + 1); } if (i < 26 && i >= 13) { Console.WriteLine("{0} {0}", "H", i - 12); } if (i < 39 && i >= 26) { Console.WriteLine("{0} {0}", "C", i - 25); } if (i < 52 && i >= 39) { Console.WriteLine("{0} {0}", "D", i - 38); } } } } }
using System; class Program { static void Main() { bool[] A = new bool[52]; int D = int.Parse(Console.ReadLine()); for (int i = 0; i < D; i++) { string[] sD = Console.ReadLine().Split(' '); if (sD[0] == "S") { A[int.Parse(sD[1]) - 1] = true; } if (sD[0] == "H") { A[int.Parse(sD[1]) + 12] = true; } if (sD[0] == "C") { A[int.Parse(sD[1]) + 25] = true; } if (sD[0] == "D") { A[int.Parse(sD[1]) + 38] = true; } } for (int i = 0; i < A.Length; i++) { if (!A[i]) { if (i < 13) { Console.WriteLine("{0} {1}", "S", i + 1); } if (i < 26 && i >= 13) { Console.WriteLine("{0} {1}", "H", i - 12); } if (i < 39 && i >= 26) { Console.WriteLine("{0} {1}", "C", i - 25); } if (i < 52 && i >= 39) { Console.WriteLine("{0} {1}", "D", i - 38); } } } } }
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
8
333
8
using System; class Program { static void Main() { bool[] A = new bool[52]; int D = int.Parse(Console.ReadLine()); for (int i = 0; i < D; i++) { string[] sD = Console.ReadLine().Split(' '); if (sD[0] == "S") A[int.Parse(sD[1]) - 1] = true; if (sD[0] == "H") A[int.Parse(sD[1]) + 12] = true; if (sD[0] == "C") A[int.Parse(sD[1]) + 25] = true; if (sD[0] == "D") A[int.Parse(sD[1]) + 38] = true; } for (int i = 0; i < 13; i++) if (!A[i]) Console.WriteLine("{0} {1}", "S", i + 1); for (int i = 13; i < 26; i++) if (!A[i]) Console.WriteLine("{0} {1}", "H", i + 1); for (int i = 26; i < 39; i++) if (!A[i]) Console.WriteLine("{0} {1}", "C", i + 1); for (int i = 39; i < 52; i++) if (!A[i]) Console.WriteLine("{0} {1}", "D", i + 1); } }
using System; class Program { static void Main() { bool[] A = new bool[52]; int D = int.Parse(Console.ReadLine()); for (int i = 0; i < D; i++) { string[] sD = Console.ReadLine().Split(' '); if (sD[0] == "S") A[int.Parse(sD[1]) - 1] = true; if (sD[0] == "H") A[int.Parse(sD[1]) + 12] = true; if (sD[0] == "C") A[int.Parse(sD[1]) + 25] = true; if (sD[0] == "D") A[int.Parse(sD[1]) + 38] = true; } for (int i = 0; i < 13; i++) if (!A[i]) Console.WriteLine("{0} {1}", "S", i + 1); for (int i = 13; i < 26; i++) if (!A[i]) Console.WriteLine("{0} {1}", "H", i - 12); for (int i = 26; i < 39; i++) if (!A[i]) Console.WriteLine("{0} {1}", "C", i - 25); for (int i = 39; i < 52; i++) if (!A[i]) Console.WriteLine("{0} {1}", "D", i - 38); } }
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 72], ["-", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 12, 203]]
8
341
12
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string s1 = Console.ReadLine(); int n = int.Parse(s1); char suit; int number; char[] suit2 = new char[4] { 'S', 'H', 'C', 'D' }; bool[,] cards = new bool[4, 13]; for (int i = 0; i < n; i++) { string[] s2 = Console.ReadLine().Split(' '); suit = char.Parse(s2[0]); number = int.Parse(s2[1]); switch (suit) { case 'S': cards[0, number - 1] = true; break; case 'H': cards[1, number - 1] = true; break; case 'C': cards[2, number - 1] = true; break; case 'D': cards[3, number - 1] = true; break; } } for (int j = 0; j <= 3; j++) { for (int k = 0; k <= 13; k++) { if (cards[j, k] == false) { Console.WriteLine(suit2[j] + " " + k + 1); } } } } } }
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { string s1 = Console.ReadLine(); int n = int.Parse(s1); char suit; int number; char[] suit2 = new char[4] { 'S', 'H', 'C', 'D' }; bool[,] cards = new bool[4, 13]; for (int i = 0; i < n; i++) { string[] s2 = Console.ReadLine().Split(' '); suit = char.Parse(s2[0]); number = int.Parse(s2[1]); switch (suit) { case 'S': cards[0, number - 1] = true; break; case 'H': cards[1, number - 1] = true; break; case 'C': cards[2, number - 1] = true; break; case 'D': cards[3, number - 1] = true; break; } } for (int j = 0; j < 4; j++) { for (int k = 0; k < 13; k++) { if (cards[j, k] == false) { Console.WriteLine(suit2[j] + " " + (k + 1)); } } } } } }
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 203], ["-", 0, 7, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 3, 4, 0, 28, 0, 16, 12, 23, 0, 24], ["+", 3, 4, 0, 28, 0, 16, 12, 23, 0, 25]]
8
288
8
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); bool[,] c; c = new bool[4, 13]; foreach (var i in Enumerable.Range(0, n)) { var ab = Console.ReadLine().Split().ToArray(); var A = ab[0]; var a = (0); var b = int.Parse(ab[1]); if (A == "S") { a = 0; } if (A == "H") { a = 1; } if (A == "C") { a = 2; } if (A == "D") { a = 3; } c[a, b] = true; } foreach (var i in Enumerable.Range(0, 13)) { if (c[0, i] == false) { Console.WriteLine("S {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[1, i] == false) { Console.WriteLine("H {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[2, i] == false) { Console.WriteLine("C {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[3, i] == false) { Console.WriteLine("D {0}", i + 1); } } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication3 { class Program { static void Main(string[] args) { var n = int.Parse(Console.ReadLine()); bool[,] c; c = new bool[4, 13]; foreach (var i in Enumerable.Range(0, n)) { var ab = Console.ReadLine().Split().ToArray(); var A = ab[0]; var a = (0); var b = int.Parse(ab[1]); if (A == "S") { a = 0; } if (A == "H") { a = 1; } if (A == "C") { a = 2; } if (A == "D") { a = 3; } c[a, b - 1] = true; } foreach (var i in Enumerable.Range(0, 13)) { if (c[0, i] == false) { Console.WriteLine("S {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[1, i] == false) { Console.WriteLine("H {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[2, i] == false) { Console.WriteLine("C {0}", i + 1); } } foreach (var i in Enumerable.Range(0, 13)) { if (c[3, i] == false) { Console.WriteLine("D {0}", i + 1); } } } } }
[["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
363
2
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication14 { class Program { static void Main() { List<string> sss = new List<string>(); string s; int a = int.Parse(Console.ReadLine()); for (int b = 0; b < a; b++) { string c = Console.ReadLine(); sss.Add(c); } for (int d = 0; d < 4; d++) { for (int e = 0; e < 13; e++) { switch (d) { case 0: s = "S " + e; break; case 1: s = "H " + e; break; case 2: s = "C " + e; break; default: s = "D " + e; break; } for (int f = 0; f < sss.Count; f++) { if (s == sss[f]) break; else if (sss.Count - 1 == f) Console.WriteLine(s); } } } } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication14 { class Program { static void Main() { List<string> sss = new List<string>(); string s; int a = int.Parse(Console.ReadLine()); for (int b = 0; b < a; b++) { string c = Console.ReadLine(); sss.Add(c); } for (int d = 0; d < 4; d++) { for (int e = 1; e < 14; e++) { switch (d) { case 0: s = "S " + e; break; case 1: s = "H " + e; break; case 2: s = "C " + e; break; default: s = "D " + e; break; } for (int f = 0; f < sss.Count; f++) { if (s == sss[f]) break; else if (sss.Count - 1 == f) Console.WriteLine(s); } } } } } }
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 7, 8, 196, 0, 7, 15, 16, 12, 203], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 12, 203]]
8
234
4
using System; namespace ITP1_6_B { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); bool[] s = new bool[14]; bool[] h = new bool[14]; bool[] c = new bool[14]; bool[] d = new bool[14]; while (n-- != 0) { string[] strs = Console.ReadLine().Split(' '); char kind = char.Parse(strs[0]); int num = int.Parse(strs[1]); switch (kind) { case 'S': s[num] = true; break; case 'H': h[num] = true; break; case 'C': c[num] = true; break; case 'd': d[num] = true; break; default: break; } } for (int i = 1; i < 14; i++) if (!s[i]) Console.WriteLine("S " + i); for (int i = 1; i < 14; i++) if (!h[i]) Console.WriteLine("H " + i); for (int i = 1; i < 14; i++) if (!c[i]) Console.WriteLine("C " + i); for (int i = 1; i < 14; i++) if (!d[i]) Console.WriteLine("D " + i); } } }
using System; namespace ITP1_6_B { class Program { static void Main(string[] args) { int n = int.Parse(Console.ReadLine()); bool[] s = new bool[14]; bool[] h = new bool[14]; bool[] c = new bool[14]; bool[] d = new bool[14]; while (n-- != 0) { string[] strs = Console.ReadLine().Split(' '); char kind = char.Parse(strs[0]); int num = int.Parse(strs[1]); switch (kind) { case 'S': s[num] = true; break; case 'H': h[num] = true; break; case 'C': c[num] = true; break; case 'D': d[num] = true; break; default: break; } } for (int i = 1; i < 14; i++) if (!s[i]) Console.WriteLine("S " + i); for (int i = 1; i < 14; i++) if (!h[i]) Console.WriteLine("H " + i); for (int i = 1; i < 14; i++) if (!c[i]) Console.WriteLine("C " + i); for (int i = 1; i < 14; i++) if (!d[i]) Console.WriteLine("D " + i); } } }
[["-", 8, 254, 0, 239, 0, 264, 0, 252, 0, 253], ["+", 8, 254, 0, 239, 0, 264, 0, 252, 0, 253]]
8
331
2
using System; namespace ITP1_6_B { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); int[] s = new int[13]; int[] h = new int[13]; int[] c = new int[13]; int[] d = new int[13]; for (int j = 0; j > num; j++) { string[] input = Console.ReadLine().Split(' '); int value = int.Parse(input[1]) - 1; switch (input[0]) { case "S": s[value] = 1; break; case "H": h[value] = 1; break; case "C": c[value] = 1; break; case "D": d[value] = 1; break; } } for (int S = 0; S < 13; S++) { if (s[S] != 1) Console.WriteLine("S {0}", S + 1); } for (int H = 0; H < 13; H++) { if (h[H] != 1) Console.WriteLine("H {0}", H + 1); } for (int C = 0; C < 13; C++) { if (c[C] != 1) Console.WriteLine("C {0}", C + 1); } for (int D = 0; D < 13; D++) { if (d[D] != 1) Console.WriteLine("D {0}", D + 1); } } } }
using System; namespace ITP1_6_B { class Program { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); int[] s = new int[13]; int[] h = new int[13]; int[] c = new int[13]; int[] d = new int[13]; for (int j = 0; j < num; j++) { string[] input = Console.ReadLine().Split(' '); int value = int.Parse(input[1]) - 1; switch (input[0]) { case "S": s[value] = 1; break; case "H": h[value] = 1; break; case "C": c[value] = 1; break; case "D": d[value] = 1; break; } } for (int S = 0; S < 13; S++) { if (s[S] != 1) Console.WriteLine("S {0}", S + 1); } for (int H = 0; H < 13; H++) { if (h[H] != 1) Console.WriteLine("H {0}", H + 1); } for (int C = 0; C < 13; C++) { if (c[C] != 1) Console.WriteLine("C {0}", C + 1); } for (int D = 0; D < 13; D++) { if (d[D] != 1) Console.WriteLine("D {0}", D + 1); } // Console.WriteLine(); } } }
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 47], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18]]
8
346
2
// ITP1_6_B //???????????? ??? using System; using System.Collections.Generic; class ITP1_6_B { static void Main(string[] args) { //n??????????????°?????£??\ int n = int.Parse(Console.ReadLine()); bool[,] barray = new bool[4, 13]; string[] sarray = new string[n]; //n???sarray???????????£??\ for (int i = 0; i < n; i++) { sarray[i] = (Console.ReadLine()); //????????§????????????st???????´???????barray?????????????????´??????true???????????? string[] st = sarray[i].Split(' '); barray[ch(st[0]), int.Parse(st[1]) - 1] = true; } //?¶??????????????????????????????????????????? for (int row = 0; row < 4; row++) { for (int columm = 0; columm < 13; columm++) { if (barray[row, columm] == false) Console.WriteLine(ch(row) + " " + columm); } } } private static int ch(string v) { switch (v) { case "S": return 0; case "H": return 1; case "C": return 2; case "D": return 3; default: break; } return 0; } private static string ch(int v) { switch (v) { case 0: return "S"; case 1: return "H"; case 2: return "C"; case 3: return "D"; default: break; } return "error"; } } /*class card { public int num; public string mark; }*/
// ITP1_6_B //???????????? ??? using System; using System.Collections.Generic; class ITP1_6_B { static void Main(string[] args) { //n??????????????°?????£??\ int n = int.Parse(Console.ReadLine()); bool[,] barray = new bool[4, 13]; string[] sarray = new string[n]; //n???sarray???????????£??\ for (int i = 0; i < n; i++) { sarray[i] = (Console.ReadLine()); //????????§????????????st???????´???????barray?????????????????´??????true???????????? string[] st = sarray[i].Split(' '); barray[ch(st[0]), int.Parse(st[1]) - 1] = true; } //?¶??????????????????????????????????????????? for (int row = 0; row < 4; row++) { for (int columm = 0; columm < 13; columm++) { if (barray[row, columm] == false) Console.WriteLine(ch(row) + " " + (columm + 1)); } } } private static int ch(string v) { switch (v) { case "S": return 0; case "H": return 1; case "C": return 2; case "D": return 3; default: break; } return 0; } private static string ch(int v) { switch (v) { case 0: return "S"; case 1: return "H"; case 2: return "C"; case 3: return "D"; default: break; } return "error"; } } /*class card { public int num; public string mark; }*/
[["+", 3, 4, 0, 28, 0, 16, 12, 23, 0, 24], ["+", 0, 28, 0, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 28, 0, 16, 12, 23, 0, 16, 12, 203], ["+", 3, 4, 0, 28, 0, 16, 12, 23, 0, 25]]
8
313
4
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace _20170409_AOJ { class Program { static void Main(string[] args) { Console.ReadLine(); string line; string suits = "SHCD"; int[,] cards = new int[4, 14]; for (; (line = Console.ReadLine()) != "";) { if (line == "") { break; } string[] sArr = line.Split(' '); string s = sArr[0]; int number = int.Parse(sArr[1]); cards[suits.IndexOf(s), number]++; } for (int i = 0; i < 4; i++) { for (int j = 1; j <= 13; j++) { if (cards[i, j] == 0) { Console.WriteLine("{0} {1}", suits[i], j); } } } Console.ReadLine(); } } }
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; namespace _20170409_AOJ { class Program { static void Main(string[] args) { Console.ReadLine(); string line; string suits = "SHCD"; int[,] cards = new int[4, 14]; for (; (line = Console.ReadLine()) != null;) { if (line == "") { break; } string[] sArr = line.Split(' '); string s = sArr[0]; int number = int.Parse(sArr[1]); cards[suits.IndexOf(s), number]++; } for (int i = 0; i < 4; i++) { for (int j = 1; j <= 13; j++) { if (cards[i, j] == 0) { Console.WriteLine("{0} {1}", suits[i], j); } } } Console.ReadLine(); } } }
[["-", 8, 196, 0, 7, 15, 16, 12, 5, 0, 62], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 215]]
8
219
3
using System; class Program { static void Main() { int x = int.Parse(Console.ReadLine()); //???????????????????????????????????° int[,] cards = new int[4, 13]; for (int i = 0; i < x; i++) { string[] str = Console.ReadLine().Split(' '); string Class = str[0]; int num = int.Parse(str[1]); int number = 0; switch (Class) { case "S": number = 0; break; case "H": number = 1; break; case "C": number = 2; break; case "D": number = 3; break; } cards[number, num] = 1; } //???????????§?????????????????\??? int[,] CollectCards = new int[4, 13]; for (int i = 0; i < cards.GetLength(0); i++) { for (int i2 = 0; i2 < cards.GetLength(1); i2++) { if (CollectCards[i, i2] == cards[i, i2]) { string OutClass = ""; switch (i) { case 0: OutClass = "S"; break; case 1: OutClass = "H"; break; case 2: OutClass = "C"; break; case 3: OutClass = "D"; break; } Console.WriteLine("{0} {1}", OutClass, i2 + 1); } } } } }
using System; class Program { static void Main() { int x = int.Parse(Console.ReadLine()); //???????????????????????????????????° int[,] cards = new int[4, 13]; for (int i = 0; i < x; i++) { string[] str = Console.ReadLine().Split(' '); string Class = str[0]; int num = int.Parse(str[1]); int number = 0; switch (Class) { case "S": number = 0; break; case "H": number = 1; break; case "C": number = 2; break; case "D": number = 3; break; } cards[number, num - 1] = 1; } //???????????§?????????????????\??? int[,] CollectCards = new int[4, 13]; for (int i = 0; i < cards.GetLength(0); i++) { for (int i2 = 0; i2 < cards.GetLength(1); i2++) { if (CollectCards[i, i2] == cards[i, i2]) { string OutClass = ""; switch (i) { case 0: OutClass = "S"; break; case 1: OutClass = "H"; break; case 2: OutClass = "C"; break; case 3: OutClass = "D"; break; } Console.WriteLine("{0} {1}", OutClass, i2 + 1); } } } } }
[["+", 31, 204, 206, 207, 0, 28, 0, 16, 17, 33], ["+", 31, 204, 206, 207, 0, 28, 0, 16, 12, 203]]
8
308
2
using System; class Program { static void Main() { int i; int[] hart = new int[13]; int[] club = new int[13]; int[] spade = new int[13]; int[] dia = new int[13]; for (i = 0; i < 13; i++) { hart[i] = 0; club[i] = 0; spade[i] = 0; dia[i] = 0; } string len = Console.ReadLine(); string[] mark = new string[int.Parse(len)]; int[] number = new int[int.Parse(len)]; for (i = 0; i < int.Parse(len); i++) { string inp = Console.ReadLine(); string[] card = inp.Split(' '); mark[i] = card[0]; number[i] = int.Parse(card[1]); switch (mark[i]) { case "H": hart[number[i] - 1] = 1; break; case "C": club[number[i] - 1] = 1; break; case "S": spade[number[i] - 1] = 1; break; case "D": dia[number[i] - 1] = 1; break; } } // shcd for (i = 0; i < 12; i++) { if (spade[i] == 0) { Console.WriteLine("S {0}", i + 1); } } for (i = 0; i < 12; i++) { if (hart[i] == 0) { Console.WriteLine("H {0}", i + 1); } } for (i = 0; i < 12; i++) { if (club[i] == 0) { Console.WriteLine("C {0}", i + 1); } } for (i = 0; i < 12; i++) { if (dia[i] == 0) { Console.WriteLine("D {0}", i + 1); } } } }
using System; class Program { static void Main() { int i; int[] hart = new int[13]; int[] club = new int[13]; int[] spade = new int[13]; int[] dia = new int[13]; for (i = 0; i < 13; i++) { hart[i] = 0; club[i] = 0; spade[i] = 0; dia[i] = 0; } string len = Console.ReadLine(); string[] mark = new string[int.Parse(len)]; int[] number = new int[int.Parse(len)]; for (i = 0; i < int.Parse(len); i++) { string inp = Console.ReadLine(); string[] card = inp.Split(' '); mark[i] = card[0]; //マーク number[i] = int.Parse(card[1]); //数字 switch (mark[i]) { case "H": hart[number[i] - 1] = 1; break; case "C": club[number[i] - 1] = 1; break; case "S": spade[number[i] - 1] = 1; break; case "D": dia[number[i] - 1] = 1; break; } } // shcd for (i = 0; i < 13; i++) { if (spade[i] == 0) { Console.WriteLine("S {0}", i + 1); } } for (i = 0; i < 13; i++) { if (hart[i] == 0) { Console.WriteLine("H {0}", i + 1); } } for (i = 0; i < 13; i++) { if (club[i] == 0) { Console.WriteLine("C {0}", i + 1); } } for (i = 0; i < 13; i++) { if (dia[i] == 0) { Console.WriteLine("D {0}", i + 1); } } } }
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 203], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 203]]
8
455
8
using System; class Program { static void Main() { bool[,] t = new bool[4, 13]; int c = int.Parse(Console.ReadLine()); for (int i = 0; i < c; i++) { string[] s = Console.ReadLine().Split(' '); int n = (int.Parse(s[1]) - 1); if (s[0] == "S") { t[0, n] = true; } else if (s[1] == "H") { t[1, n] = true; } else if (s[2] == "C") { t[2, n] = true; } else if (s[3] == "D") { t[3, n] = true; } } for (int i = 0; i < 4; i++) { for (int j = 0; j < 13; j++) { if (!t[i, j]) { string r = ""; if (i == 0) { r = "S " + (j + 1).ToString(); } else if (i == 1) { r = "H " + (j + 1).ToString(); } else if (i == 2) { r = "C " + (j + 1).ToString(); } else if (i == 3) { r = "D " + (j + 1).ToString(); } Console.WriteLine(r); } } } } }
using System; class Program { static void Main() { bool[,] t = new bool[4, 13]; int c = int.Parse(Console.ReadLine()); for (int i = 0; i < c; i++) { string[] s = Console.ReadLine().Split(' '); int n = (int.Parse(s[1]) - 1); if (s[0] == "S") { t[0, n] = true; } else if (s[0] == "H") { t[1, n] = true; } else if (s[0] == "C") { t[2, n] = true; } else if (s[0] == "D") { t[3, n] = true; } } for (int i = 0; i < 4; i++) { for (int j = 0; j < 13; j++) { if (!t[i, j]) { string r = ""; if (i == 0) { r = "S " + (j + 1).ToString(); } else if (i == 1) { r = "H " + (j + 1).ToString(); } else if (i == 2) { r = "C " + (j + 1).ToString(); } else if (i == 3) { r = "D " + (j + 1).ToString(); } Console.WriteLine(r); } } } } }
[["-", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["+", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203]]
8
340
6
using System; using System.Collections; class Program { static void Main() { bool[,] card = new bool[4, 13]; HashTable types = new HashTable(); types.setKeyValue("S", 0); types.setKeyValue("H", 1); types.setKeyValue("C", 2); types.setKeyValue("D", 3); int cardnum = int.Parse(Console.ReadLine()); for (int i = 0; i < cardnum; i++) { string[] line = Console.ReadLine().Split(' '); card[types.getValue(line[0]), int.Parse(line[1]) - 1] = true; } for (int i = 0; i < 4; i++) { for (int j = 0; j < 13; j++) { if (!card[i, j]) Console.WriteLine(types.getKey(i) + " " + j.ToString()); } } } } class HashTable { Hashtable keyValue = new Hashtable(); Hashtable valueKey = new Hashtable(); public void setKeyValue(string key, int value) { keyValue[key] = value; valueKey[value] = key; } public string getKey(int value) { return valueKey[value].ToString(); } public int getValue(string key) { return (int)keyValue[key]; } }
using System; using System.Collections; class Program { static void Main() { bool[,] card = new bool[4, 13]; HashTable types = new HashTable(); types.setKeyValue("S", 0); types.setKeyValue("H", 1); types.setKeyValue("C", 2); types.setKeyValue("D", 3); int cardnum = int.Parse(Console.ReadLine()); for (int i = 0; i < cardnum; i++) { string[] line = Console.ReadLine().Split(' '); card[types.getValue(line[0]), int.Parse(line[1]) - 1] = true; } for (int i = 0; i < 4; i++) { for (int j = 0; j < 13; j++) { if (!card[i, j]) Console.WriteLine(types.getKey(i) + " " + (j + 1).ToString()); } } } } class HashTable { Hashtable keyValue = new Hashtable(); Hashtable valueKey = new Hashtable(); public void setKeyValue(string key, int value) { keyValue[key] = value; valueKey[value] = key; } public string getKey(int value) { return valueKey[value].ToString(); } public int getValue(string key) { return (int)keyValue[key]; } }
[["+", 0, 16, 12, 213, 63, 214, 205, 23, 0, 24], ["+", 12, 213, 63, 214, 205, 23, 0, 16, 17, 72], ["+", 12, 213, 63, 214, 205, 23, 0, 16, 12, 203], ["+", 0, 16, 12, 213, 63, 214, 205, 23, 0, 25]]
8
307
4