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.Collections;
using System.Collections.Generic;
class main {
public static void Main() {
int ct;
int[] H = new int[100000000];
int[] W = new int[100000000];
for (ct = 0;; ct++) {
string[] str = Console.ReadLine().Split(' ');
H[ct] = int.Parse(str[0]);
W[ct] = int.Parse(str[1]);
if (H[ct] == 0 && W[ct] == 0) {
break;
}
}
for (int i = 0; i < ct; i++) {
for (int j = 0; j < H[i]; j++) {
for (int k = 0; k < W[i]; k++) {
Console.Write('#');
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
using System;
using System.Collections;
using System.Collections.Generic;
class main {
public static void Main() {
int ct;
int[] H = new int[100000];
int[] W = new int[100000];
for (ct = 0;; ct++) {
string[] str = Console.ReadLine().Split(' ');
H[ct] = int.Parse(str[0]);
W[ct] = int.Parse(str[1]);
if (H[ct] == 0 && W[ct] == 0) {
break;
}
}
for (int i = 0; i < ct; i++) {
for (int j = 0; j < H[i]; j++) {
for (int k = 0; k < W[i]; k++) {
Console.Write('#');
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
[["-", 0, 212, 0, 227, 39, 224, 225, 226, 0, 203], ["+", 0, 212, 0, 227, 39, 224, 225, 226, 0, 203]]
| 8
| 207
| 4
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
while (true) {
int[] inputs =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
int h = inputs[0];
int w = inputs[1];
bool finished = (h == 0) && (w == 0);
if (finished)
break;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
while (true) {
int[] inputs =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
int h = inputs[0];
int w = inputs[1];
bool finished = (h == 0) && (w == 0);
if (finished)
break;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 163
| 6
|
using System;
class Program {
static void Main(string[] args) {
Input CInput = new Input();
// double 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_double();
input = CInput.Multiline_int(' ', 2, ref num);
for (int i = 0; i < 999999999; i++) {
if (input[i, 0] == 0 && input[i, 1] == 0)
break;
for (int k = 0; k < input[i, 0]; k++) {
for (int j = 0; j < input[i, 1]; j++) {
Console.Write("#");
}
Console.WriteLine();
}
Console.WriteLine();
}
}
class Input {
public enum Define {
MAX_ArraySize = 1000000,
ArraySize2d = 100, // 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();
// double 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_double();
input = CInput.Multiline_int(' ', 2, ref num);
for (int i = 0; i < 999999999; i++) {
if (input[i, 0] == 0 && input[i, 1] == 0)
break;
for (int k = 0; k < input[i, 0]; k++) {
for (int j = 0; j < input[i, 1]; j++) {
Console.Write("#");
}
Console.WriteLine();
}
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, 201, 0, 329, 8, 330, 0, 331, 51, 203], ["+", 8, 201, 0, 329, 8, 330, 0, 331, 51, 203]]
| 8
| 604
| 2
|
using System;
class Print_a_Rectangle {
public static void Main() {
while (true) {
string number_str = Console.ReadLine();
string[] number_tmp = number_str.Split();
int H = int.Parse(number_tmp[0]);
int W = int.Parse(number_tmp[1]);
if (H == 0 && W == 0)
break;
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
|
using System;
class Print_a_Rectangle {
public static void Main() {
while (true) {
string number_str = Console.ReadLine();
string[] number_tmp = number_str.Split();
int H = int.Parse(number_tmp[0]);
int W = int.Parse(number_tmp[1]);
if (H == 0 && W == 0)
break;
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; j++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 126
| 6
|
using System;
using System.Linq;
namespace Ex160506_1 {
public class Program {
public static void Main(string[] args) {
while (true) {
var input = Console.ReadLine().Split(' ');
var h = int.Parse(input[0]);
var w = int.Parse(input[1]);
if (h + w == 0)
break;
Enumerable.Repeat(Enumerable.Repeat('#', w).ToArray(), h)
.ToList()
.ForEach(Console.WriteLine);
}
}
}
}
|
using System;
using System.Linq;
namespace Ex160506_1 {
public class Program {
public static void Main(string[] args) {
while (true) {
var input = Console.ReadLine().Split(' ');
var h = int.Parse(input[0]);
var w = int.Parse(input[1]);
if (h + w == 0)
break;
Enumerable.Repeat(Enumerable.Repeat('#', w).ToArray(), h)
.ToList()
.ForEach(Console.WriteLine);
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
| 120
| 6
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication3 {
class Program {
static void Main(string[] args) {
while (true) {
var HW = Console.ReadLine().Split().Select(int.Parse).ToArray();
var H = HW[0];
var W = HW[1];
if (H == 0)
break;
foreach (var i in Enumerable.Range(0, H)) {
foreach (var j in Enumerable.Range(0, W - 1)) {
Console.Write("#");
}
Console.WriteLine("#");
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication3 {
class Program {
static void Main(string[] args) {
while (true) {
var HW = Console.ReadLine().Split().Select(int.Parse).ToArray();
var H = HW[0];
var W = HW[1];
if (H == 0)
break;
foreach (var i in Enumerable.Range(0, H)) {
foreach (var j in Enumerable.Range(0, W - 1)) {
Console.Write("#");
}
Console.WriteLine("#");
}
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
| 145
| 6
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp9 {
class Program {
public static void Main(string[] args) {
while (true) {
string[] sss = Console.ReadLine().Split(' ');
int a = int.Parse(sss[0]);
int b = int.Parse(sss[1]);
if (a == 0 && b == 0) {
break;
}
for (int d = 1; d <= a; d++) {
for (int c = 1; c <= b; c++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApp9 {
class Program {
public static void Main(string[] args) {
while (true) {
string[] sss = Console.ReadLine().Split(' ');
int a = int.Parse(sss[0]);
int b = int.Parse(sss[1]);
if (a == 0 && b == 0) {
break;
}
for (int d = 1; d <= a; d++) {
for (int c = 1; c <= b; c++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 151
| 6
|
using System;
using System.Linq;
namespace AOJ_console {
class _1_5_A {
static void Main() {
while (true) {
var rect =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
if (rect[0] == 0 && rect[1] == 0)
break;
Enumerable.Range(1, rect[0])
.Select(x => Enumerable.Range(1, rect[1])
.Aggregate("", (str, y) => str += "#")
.Trim())
.ToList()
.ForEach(x => Console.WriteLine(x));
}
}
}
}
|
using System;
using System.Linq;
namespace AOJ_console {
class _1_5_A {
static void Main() {
while (true) {
var rect =
Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToList();
if (rect[0] == 0 && rect[1] == 0)
break;
Enumerable.Range(1, rect[0])
.Select(x => Enumerable.Range(1, rect[1])
.Aggregate("", (str, y) => str += "#")
.Trim())
.ToList()
.ForEach(x => Console.WriteLine(x));
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
| 146
| 6
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace AOJ {
public class AOJ {
public static void Main(string[] args) {
while (true) {
int[] n = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
if (n[0] == 0 && n[1] == 0)
break;
string cache = new string('#', n[1]);
for (int m = 0; m < n[0]; ++m) {
Console.WriteLine(cache);
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
namespace AOJ {
public class AOJ {
public static void Main(string[] args) {
while (true) {
int[] n = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
if (n[0] == 0 && n[1] == 0)
break;
string cache = new string('#', n[1]);
for (int m = 0; m < n[0]; ++m) {
Console.WriteLine(cache);
}
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
| 131
| 6
|
using System;
namespace AOJ {
class Program {
static void Main(string[] args) {
while (true) {
var read = Console.ReadLine();
var temp_string = read.Split(' ');
int H = int.Parse(temp_string[0]), W = int.Parse(temp_string[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int l = 0; l < W; l++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
namespace AOJ {
class Program {
static void Main(string[] args) {
while (true) {
var read = Console.ReadLine();
var temp_string = read.Split(' ');
int H = int.Parse(temp_string[0]), W = int.Parse(temp_string[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int l = 0; l < W; l++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 133
| 6
|
using System;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
while (true) {
string input = Console.ReadLine();
string[] change = input.Split(' ');
int h = int.Parse(change[0]);
int w = int.Parse(change[1]);
if (h == 0 && w == 0)
break;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
while (true) {
string input = Console.ReadLine();
string[] change = input.Split(' ');
int h = int.Parse(change[0]);
int w = int.Parse(change[1]);
if (h == 0 && w == 0)
break;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 136
| 6
|
using System;
class A {
public static void Main() {
while (true) {
string[] input = Console.ReadLine().Split(' ');
int H = int.Parse(input[0]);
int W = int.Parse(input[1]);
if (H == W && H == 0) {
break;
}
for (int x = 0; x < W; x++) {
for (int i = 0; i < H; i++) {
Console.Write("#");
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
using System;
class A {
public static void Main() {
while (true) {
string[] input = Console.ReadLine().Split(' ');
int H = int.Parse(input[0]);
int W = int.Parse(input[1]);
if (H == W && H == 0) {
break;
}
for (int x = 0; x < H; x++) {
for (int i = 0; i < W; i++) {
Console.Write("#");
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
[["-", 0, 52, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 52, 8, 196, 0, 7, 15, 16, 12, 22], ["-", 0, 7, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 12, 22]]
| 8
| 132
| 4
|
using System;
namespace ITP1_5_A {
class Program {
static void Main(string[] args) {
for (int i = 1;; i++) {
string[] input = Console.ReadLine().Split(' ');
int h = int.Parse(input[0]);
int w = int.Parse(input[1]);
if (h == 0 && w == 0)
break;
for (int j = 1; j <= h; j++) {
for (int k = 1; k <= w; k++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
namespace ITP1_5_A {
class Program {
static void Main(string[] args) {
for (int i = 1;; i++) {
string[] input = Console.ReadLine().Split(' ');
int h = int.Parse(input[0]);
int w = int.Parse(input[1]);
if (h == 0 && w == 0)
break;
for (int j = 1; j <= h; j++) {
for (int k = 1; k <= w; k++) {
Console.Write("#");
}
Console.WriteLine();
}
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, 7, 8, 196, 0, 1, 0, 35]]
| 8
| 138
| 6
|
using System;
using System.Linq;
namespace _5_A {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
int a = x[0];
int b = x[1];
for (int a1 = 1; a1 <= a; a1++) {
for (int b1 = 1; b1 <= b; b1++) {
Console.Write("#");
}
}
// Console.WriteLine();
Console.WriteLine();
}
}
}
}
|
using System;
using System.Linq;
namespace _5_A {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
int a = x[0];
int b = x[1];
for (int a1 = 1; a1 <= a; a1++) {
for (int b1 = 1; b1 <= b; b1++) {
Console.Write("#");
}
Console.WriteLine();
}
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, 7, 8, 196, 0, 1, 0, 35]]
| 8
| 143
| 6
|
using System;
using System.Linq;
namespace _5_A {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
for (int i = 0; i < x[0]; i++) {
for (int I = 0; I < x[1]; I++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Linq;
namespace _5_A {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
for (int i = 0; i < x[0]; i++) {
for (int I = 0; I < x[1]; I++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 132
| 6
|
using System;
namespace aoj5a {
class Program {
static int Main(string[] args) {
for (;;) {
string[] HandW = (Console.ReadLine()).Split(' ');
int H = int.Parse(HandW[0]);
int W = int.Parse(HandW[1]);
if (H + W == 0) {
return 0;
}
string line = null;
for (int i = 1; i <= W; i++) {
line += '#';
}
for (int i = 1; i <= H; i++) {
Console.WriteLine(line);
}
}
}
}
}
|
using System;
namespace aoj5a {
class Program {
static int Main(string[] args) {
for (;;) {
string[] HandW = (Console.ReadLine()).Split(' ');
int H = int.Parse(HandW[0]);
int W = int.Parse(HandW[1]);
if (H + W == 0) {
return 0;
}
string line = null;
for (int i = 1; i <= W; i++) {
line += '#';
}
for (int i = 1; i <= H; i++) {
Console.WriteLine(line);
}
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, 7, 8, 196, 0, 1, 0, 35]]
| 8
| 138
| 6
|
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
namespace LogicSummoner {
class Program {
static void Main(string[] args) {
while (true) {
var nums = GetNumbersInt();
if (nums[0] == 0 && nums[1] == 0) {
break;
}
var row = new string(Enumerable.Repeat('#', nums[1]).ToArray());
for (int i = 0; i < nums[0]; i++) {
Console.WriteLine(row);
}
}
}
// static StreamReader Console = new StreamReader("input.txt");
static int GetNumber() { return int.Parse(Console.ReadLine().Trim()); }
static double GetDounble() { return double.Parse(Console.ReadLine().Trim()); }
static List<int> GetNumbersInt(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => int.Parse(x))
.ToList();
}
static List<long> GetNumbersLong(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => long.Parse(x))
.ToList();
}
static List<double> GetNumbersDouble(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => double.Parse(x))
.ToList();
}
static List<string> GetStrings() {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.ToList();
}
}
}
|
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
namespace LogicSummoner {
class Program {
static void Main(string[] args) {
while (true) {
var nums = GetNumbersInt();
if (nums[0] == 0 && nums[1] == 0) {
break;
}
var row = new string(Enumerable.Repeat('#', nums[1]).ToArray());
for (int i = 0; i < nums[0]; i++) {
Console.WriteLine(row);
}
Console.WriteLine();
}
}
// static StreamReader Console = new StreamReader("input.txt");
static int GetNumber() { return int.Parse(Console.ReadLine().Trim()); }
static double GetDounble() { return double.Parse(Console.ReadLine().Trim()); }
static List<int> GetNumbersInt(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => int.Parse(x))
.ToList();
}
static List<long> GetNumbersLong(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => long.Parse(x))
.ToList();
}
static List<double> GetNumbersDouble(int n = 0) {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.Select(x => double.Parse(x))
.ToList();
}
static List<string> GetStrings() {
return Console.ReadLine()
.Trim()
.Split(new[] { " " }, StringSplitOptions.RemoveEmptyEntries)
.ToList();
}
}
}
|
[["+", 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
| 392
| 6
|
using System;
namespace _1_5_A {
class Program {
static void Main(string[] args) {
while (true) {
string[] str = Console.ReadLine().Split(' ');
int a = int.Parse(str[0]);
int b = int.Parse(str[1]);
if (a == 0 || b == 0) {
break;
}
for (int i = 0; i < a; i += 1) {
for (int j = 0; j < b; j += 1) {
Console.Write("#");
}
Console.Write("\n");
}
Console.WriteLine("\n");
}
}
}
}
|
using System;
namespace _1_5_A {
class Program {
static void Main(string[] args) {
while (true) {
string[] str = Console.ReadLine().Split(' ');
int a = int.Parse(str[0]);
int b = int.Parse(str[1]);
if (a == 0 || b == 0) {
break;
}
for (int i = 0; i < a; i += 1) {
for (int j = 0; j < b; j += 1) {
Console.Write("#");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
| 8
| 147
| 2
|
using System;
using System.Linq;
namespace Number {
class Program {
static void Main(string[] args) {
while (true) {
string s = Console.ReadLine().Trim('\n');
if (s == "0 0")
break;
int[] i = s.Split(' ').Select(e => int.Parse(e)).ToArray();
int a = i[0];
int b = i[1];
for (int j = 0; j < a; j++)
Console.WriteLine(new string('#', b));
}
}
}
}
|
using System;
using System.Linq;
namespace Number {
class Program {
static void Main(string[] args) {
while (true) {
string s = Console.ReadLine().Trim('\n');
if (s == "0 0")
break;
int[] i = s.Split(' ').Select(e => int.Parse(e)).ToArray();
int a = i[0];
int b = i[1];
for (int j = 0; j < a; j++)
Console.WriteLine(new string('#', b));
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
| 134
| 6
|
using System;
public class Test {
public static void Main() {
string[] data;
int H, W;
while (true) {
data = Console.ReadLine().Split();
if (int.Parse(data[0]) == 0 && int.Parse(data[1]) == 0) {
break;
}
for (H = int.Parse(data[0]); H > 0; H--) {
for (W = int.Parse(data[1]); W > 0; W--) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
|
using System;
public class Test {
public static void Main() {
string[] data;
int H, W;
while (true) {
data = Console.ReadLine().Split();
if (int.Parse(data[0]) == 0 && int.Parse(data[1]) == 0) {
break;
}
for (H = int.Parse(data[0]); H > 0; H--) {
for (W = int.Parse(data[1]); W > 0; W--) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 135
| 6
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
List<int> a = new List<int>();
List<int> b = new List<int>();
// long[] a = new long[n];
// string[] s = Console.ReadLine().Split(' ');
// int a = int.Parse(Console.ReadLine());
while (true) {
string[] s = Console.ReadLine().Split(' ');
int c = int.Parse(s[0]);
int d = int.Parse(s[1]);
if (c == 0 && d == 0)
break;
a.Add(c);
b.Add(d);
}
for (int i = 0; i < a.Count; i++) {
for (int y = 0; y < b[i]; y++) {
for (int x = 0; x < a[i]; x++) {
Console.Write("#");
}
Console.WriteLine("");
}
Console.WriteLine("");
}
// Console.WriteLine("");
}
}
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
List<int> a = new List<int>();
List<int> b = new List<int>();
// long[] a = new long[n];
// string[] s = Console.ReadLine().Split(' ');
// int a = int.Parse(Console.ReadLine());
while (true) {
string[] s = Console.ReadLine().Split(' ');
int c = int.Parse(s[0]);
int d = int.Parse(s[1]);
if (c == 0 && d == 0)
break;
a.Add(c);
b.Add(d);
}
for (int i = 0; i < a.Count; i++) {
for (int y = 0; y < a[i]; y++) {
for (int x = 0; x < b[i]; x++) {
Console.Write("#");
}
Console.WriteLine("");
}
Console.WriteLine("");
}
// Console.WriteLine("");
}
}
|
[["-", 8, 196, 0, 7, 15, 16, 12, 204, 205, 22], ["+", 8, 196, 0, 7, 15, 16, 12, 204, 205, 22]]
| 8
| 214
| 4
|
using System;
class Program {
public static void Main(string[] args) {
while (true) {
string[] read = Console.ReadLine().Split(' ');
int H = int.Parse(read[0]);
int W = int.Parse(read[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
Console.Write("#");
}
Console.WriteLine();
}
}
}
}
|
using System;
class Program {
public static void Main(string[] args) {
while (true) {
string[] read = Console.ReadLine().Split(' ');
int H = int.Parse(read[0]);
int W = int.Parse(read[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
Console.Write("#");
}
Console.WriteLine();
}
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
| 128
| 6
|
using System;
using System.Linq;
class Program {
static void Main() {
int[] dts = null;
string r = "";
while (true) {
// 0:H, 1:W
dts = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
if (dts[0] == 0 && dts[1] == 0)
break;
for (int i = 0; i < dts[0]; i++) {
r = "";
for (int j = 0; j < dts[1]; j++) {
r += "#";
}
Console.WriteLine(r);
Console.WriteLine("");
}
}
}
}
|
using System;
using System.Linq;
class Program {
static void Main() {
int[] dts = null;
string r = "";
while (true) {
// 0:H, 1:W
dts = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
if (dts[0] == 0 && dts[1] == 0)
break;
for (int i = 0; i < dts[0]; i++) {
r = "";
for (int j = 0; j < dts[1]; j++) {
r += "#";
}
Console.WriteLine(r);
}
Console.WriteLine("");
}
}
}
|
[["+", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46]]
| 8
| 152
| 2
|
using System;
using System.Collections.Generic;
namespace ConsoleApp3_ITP1_5_A {
class Program {
static void Main(string[] args) {
List<string[]> inputList = new List<string[]>();
for (;;) {
string[] input = Console.ReadLine().Split(' ');
var height = input[0];
var width = input[1];
if (height == "0" && width == "0") {
break;
} else {
inputList.Add(input);
}
}
foreach (string[] ary in inputList) {
var h = Int32.Parse(ary[0]);
var w = Int32.Parse(ary[1]);
for (int j = 1; j <= h; j++) {
for (int i = 1; i <= w; i++) {
Console.Write("#");
}
Console.WriteLine("\n");
}
Console.WriteLine("\n");
}
}
}
}
|
using System;
using System.Collections.Generic;
namespace ConsoleApp3_ITP1_5_A {
class Program {
static void Main(string[] args) {
List<string[]> inputList = new List<string[]>();
for (;;) {
string[] input = Console.ReadLine().Split(' ');
var height = input[0];
var width = input[1];
if (height == "0" && width == "0") {
break;
} else {
inputList.Add(input);
}
}
foreach (string[] ary in inputList) {
var h = Int32.Parse(ary[0]);
var w = Int32.Parse(ary[1]);
for (int j = 1; j <= h; j++) {
for (int i = 1; i <= w; i++) {
Console.Write("#");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
[["-", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22], ["+", 8, 196, 0, 1, 0, 213, 63, 214, 141, 22]]
| 8
| 212
| 4
|
using System;
using System.Linq;
using System.Text;
class Problem {
public static void Main() {
var str = "";
while ((str = Console.ReadLine()) != "0 0") {
var data = str.Split().Select(int.Parse).ToArray();
var line = "";
for (var i = 0; i < data[1]; i++)
line += "#";
for (var i = 0; i < data[0]; i++)
Console.WriteLine(line);
}
}
}
|
using System;
using System.Linq;
using System.Text;
class Problem {
public static void Main() {
var str = "";
while ((str = Console.ReadLine()) != "0 0") {
var data = str.Split().Select(int.Parse).ToArray();
var line = "";
for (var i = 0; i < data[1]; i++)
line += "#";
for (var i = 0; i < data[0]; i++)
Console.WriteLine(line);
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
| 122
| 6
|
using System;
namespace PrintRectangle {
class MainClass {
public static void Main(string[] args) {
while (true) {
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
int height, Wide;
height = int.Parse(tmp[0]);
Wide = int.Parse(tmp[1]);
if (height == 0 && Wide == 0)
break;
for (int i = 1; i <= height; i++) {
for (int j = 1; j <= Wide; j++) {
Console.Write((i == 1 || i == height || j == 1 || j == Wide) ? "#"
: " ");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
using System;
namespace PrintRectangle {
class MainClass {
public static void Main(string[] args) {
while (true) {
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
int height, Wide;
height = int.Parse(tmp[0]);
Wide = int.Parse(tmp[1]);
if (height == 0 && Wide == 0)
break;
for (int i = 1; i <= height; i++) {
for (int j = 1; j <= Wide; j++) {
Console.Write((i == 1 || i == height || j == 1 || j == Wide) ? "#"
: ".");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
[["-", 3, 4, 0, 28, 0, 41, 75, 5, 0, 222], ["+", 3, 4, 0, 28, 0, 41, 75, 5, 0, 222]]
| 8
| 173
| 2
|
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) {
if ((i == 0) || (i == tate)) {
for (int j = 0; j <= yoko; ++j) {
Console.Write("#");
}
} else {
for (int jj = 0; jj <= yoko; ++jj) {
if ((jj == 0) || (jj == yoko)) {
Console.Write("#");
} else {
Console.Write(".");
}
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
}
|
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 = 1; i <= tate; ++i) {
if ((i == 1) || (i == tate)) {
for (int j = 1; j <= yoko; ++j) {
Console.Write("#");
}
} else {
for (int jj = 1; jj <= yoko; ++jj) {
if ((jj == 1) || (jj == yoko)) {
Console.Write("#");
} else {
Console.Write(".");
}
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
}
|
[["-", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 7, 10, 198, 0, 200, 0, 212, 0, 203], ["-", 0, 57, 15, 16, 31, 23, 0, 16, 12, 203], ["+", 0, 57, 15, 16, 31, 23, 0, 16, 12, 203]]
| 8
| 232
| 10
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
while (true) {
//????????¨??????????????????
string[] s = Console.ReadLine().Split(' ');
int high = int.Parse(s[0]);
int width = int.Parse(s[1]);
//????????¨????????¨??????0???????????????????????????????????????
if ((high == 0) && (width) == 0)
break;
for (int i = 0; i < high; i++) {
for (int j = 0; j < width; j++) {
if ((i == 1) || (i == high - 1) || (j == 0) || (j == width - 1))
Console.Write("#");
else
Console.Write(".");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
while (true) {
//????????¨??????????????????
string[] s = Console.ReadLine().Split(' ');
int high = int.Parse(s[0]);
int width = int.Parse(s[1]);
//????????¨????????¨??????0???????????????????????????????????????
if ((high == 0) && (width) == 0)
break;
for (int i = 0; i < high; i++) {
for (int j = 0; j < width; j++) {
if ((i == 0) || (i == high - 1) || (j == 0) || (j == width - 1))
Console.Write("#");
else
Console.Write(".");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
[["-", 31, 16, 31, 16, 31, 23, 0, 16, 12, 203], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 12, 203]]
| 8
| 201
| 2
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
String[] str = Console.ReadLine().Split(' ');
int H = int.Parse(str[0]);
int W = int.Parse(str[1]);
while (H != 0 || W != 0) {
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H) {
Console.Write("#");
} else if (j == 0 || j == W) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
str = Console.ReadLine().Split(' ');
H = int.Parse(str[0]);
W = int.Parse(str[1]);
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
String[] str = Console.ReadLine().Split(' ');
int H = int.Parse(str[0]);
int W = int.Parse(str[1]);
while (H != 0 || W != 0) {
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1) {
Console.Write("#");
} else if (j == 0 || j == W - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
str = Console.ReadLine().Split(' ');
H = int.Parse(str[0]);
W = int.Parse(str[1]);
}
}
}
}
|
[["+", 0, 57, 15, 16, 12, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 16, 12, 16, 12, 16, 12, 203], ["+", 75, 57, 15, 16, 12, 16, 12, 16, 17, 33], ["+", 75, 57, 15, 16, 12, 16, 12, 16, 12, 203]]
| 8
| 228
| 4
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ConsoleApp9 {
class Program {
public static void Main(string[] args) {
while (true) {
string[] sss = Console.ReadLine().Split(' ');
int a = int.Parse(sss[0]);
int b = int.Parse(sss[1]);
if (a == 0 && b == 0) {
break;
}
for (int c = 1; c <= a; c++) {
for (int d = 1; d <= b; d++) {
if (c == 1 || c == a || d == 1 || d == b) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
namespace ConsoleApp9 {
class Program {
public static void Main(string[] args) {
while (true) {
string[] sss = Console.ReadLine().Split(' ');
int a = int.Parse(sss[0]);
int b = int.Parse(sss[1]);
if (a == 0 && b == 0) {
break;
}
for (int c = 1; c <= a; c++) {
for (int d = 1; d <= b; d++) {
if (c == 1 || c == a || d == 1 || d == b) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
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
| 188
| 6
|
using System;
class A {
public static void Main() {
while (true) {
string[] input = Console.ReadLine().Split(' ');
int H = int.Parse(input[0]);
int W = int.Parse(input[1]);
if (H == W && H == 0) {
break;
}
for (int x = 0; x < H; x++) {
for (int i = 0; i < W; i++) {
if (x == 0 || x == W - 1 || i == 0 | i == H - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
using System;
class A {
public static void Main() {
while (true) {
string[] input = Console.ReadLine().Split(' ');
int H = int.Parse(input[0]);
int W = int.Parse(input[1]);
if (H == W && H == 0) {
break;
}
for (int x = 0; x < H; x++) {
for (int i = 0; i < W; i++) {
if (x == 0 || x == H - 1 || i == 0 | i == W - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
|
[["-", 15, 16, 31, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 16, 31, 16, 12, 16, 12, 16, 31, 22], ["-", 15, 16, 12, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 16, 12, 16, 12, 16, 12, 16, 31, 22]]
| 8
| 168
| 4
|
using System;
namespace KitaSoftKoubouEnshuuMondai {
class Program {
static void Main(string[] args) {
while (true) {
string[] data = Console.ReadLine().Split(' ');
int H = int.Parse(data[0]);
int W = int.Parse(data[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1)
Console.Write('#');
else if (j == 0 || j == W - 1)
Console.Write('#');
else
Console.Write('.');
}
Console.WriteLine();
}
}
}
}
}
|
using System;
namespace KitaSoftKoubouEnshuuMondai {
class Program {
static void Main(string[] args) {
while (true) {
string[] data = Console.ReadLine().Split(' ');
int H = int.Parse(data[0]);
int W = int.Parse(data[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1)
Console.Write('#');
else if (j == 0 || j == W - 1)
Console.Write('#');
else
Console.Write('.');
}
Console.WriteLine();
}
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
| 175
| 6
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace StartFinish {
class Program {
static void Main(string[] args) {
while (true) {
int[] hw = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
if (hw[0] == 0 && hw[1] == 0) {
break;
}
for (int i = 0; i < hw[0]; i++) {
if (i == 0 || i == hw[0] - 1) {
for (int j = 0; j < hw[1]; j++) {
Console.Write("#");
}
} else {
for (int j = 0; j < hw[1]; j++) {
if (j == 0 || j == hw[1] - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace StartFinish {
class Program {
static void Main(string[] args) {
while (true) {
int[] hw = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
if (hw[0] == 0 && hw[1] == 0) {
break;
}
for (int i = 0; i < hw[0]; i++) {
if (i == 0 || i == hw[0] - 1) {
for (int j = 0; j < hw[1]; j++) {
Console.Write("#");
}
} else {
for (int j = 0; j < hw[1]; j++) {
if (j == 0 || j == hw[1] - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
}
Console.WriteLine();
}
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
| 229
| 6
|
using System;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
while (true) {
string Date = Console.ReadLine();
string[] date = Date.Split(' ');
int H = int.Parse(date[0]);
int W = int.Parse(date[1]);
if (H == 0 && W == 0) // H,W??±???0????????????
{
break;
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; ++j) {
if (i == 1 || i == H) //?§?????????¨?????????
{
if (j == W) //????????????
{
Console.WriteLine("#");
} else {
Console.Write("#");
}
} else {
if (j == 1 || j == W) {
if (j == 1) {
Console.Write("#");
} else {
Console.WriteLine("#");
}
} else {
Console.Write(".");
}
}
}
}
}
}
}
}
|
using System;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
while (true) {
string Date = Console.ReadLine();
string[] date = Date.Split(' ');
int H = int.Parse(date[0]);
int W = int.Parse(date[1]);
if (H == 0 && W == 0) // H,W??±???0????????????
{
break;
}
for (int i = 1; i <= H; i++) {
for (int j = 1; j <= W; ++j) {
if (i == 1 || i == H) //?§?????????¨?????????
{
if (j == W) //????????????
{
Console.WriteLine("#");
} else {
Console.Write("#");
}
} else {
if (j == 1 || j == W) {
if (j == 1) {
Console.Write("#");
} else {
Console.WriteLine("#");
}
} else {
Console.Write(".");
}
}
}
}
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
| 223
| 6
|
using System;
using System.Linq;
public class Hello {
public static void Main() {
string[] s;
int W, H = 0;
while ((s = Console.ReadLine().Split()) != null) {
H = int.Parse(s[0].ToString());
W = int.Parse(s[1].ToString());
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1 || j == 0 || j == W - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.Write("\n");
}
}
}
}
|
using System;
using System.Linq;
public class Hello {
public static void Main() {
string[] s;
int W, H = 0;
while ((s = Console.ReadLine().Split()) != null) {
H = int.Parse(s[0].ToString());
W = int.Parse(s[1].ToString());
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i == H - 1 || j == 0 || j == W - 1) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.Write("\n");
}
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
| 183
| 6
|
using System;
public class Test {
public static void Main() {
string[] data;
int H, W; //???????¨?
while (true) {
data = Console.ReadLine().Split();
if (int.Parse(data[0]) == 0 && int.Parse(data[1]) == 0) {
break;
}
for (H = int.Parse(data[0]); H > 0; H--) {
for (W = int.Parse(data[1]); W > 0; W--) {
if (H != 1 && W != 1 && H != int.Parse(data[0]) &&
W != int.Parse(data[1])) {
Console.Write(".");
} else {
Console.Write("#");
}
}
Console.WriteLine();
}
}
}
}
|
using System;
public class Test {
public static void Main() {
string[] data;
int H, W; //???????¨?
while (true) {
data = Console.ReadLine().Split();
if (int.Parse(data[0]) == 0 && int.Parse(data[1]) == 0) {
break;
}
for (H = int.Parse(data[0]); H > 0; H--) {
for (W = int.Parse(data[1]); W > 0; W--) {
if (H != 1 && W != 1 && H != int.Parse(data[0]) &&
W != int.Parse(data[1])) {
Console.Write(".");
} else {
Console.Write("#");
}
}
Console.WriteLine();
}
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
| 184
| 6
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
List<int> InputList = new List<int>();
List<List<int>> ResultList = new List<List<int>>();
string oputputstring = string.Empty;
string outputpoint = string.Empty;
while (true) {
var Input = Console.ReadLine().Split(' ');
int H = int.Parse(Input[0]);
int W = int.Parse(Input[1]);
if (H == 0 && W == 0)
break;
InputList = new List<int>();
InputList.Add(H);
InputList.Add(W);
ResultList.Add(InputList);
}
foreach (var InThelist in ResultList) {
//#?????°?????£????????????(W)
for (int x = 0; x < InThelist[1]; x++) {
oputputstring += "#";
}
//???#???#?????¨?????¨???????????????????????????
for (int z = 0; z < InThelist[1]; z++) {
if (z == 0 || z == InThelist[1] - 1)
outputpoint += "#";
else
outputpoint += ".";
}
//?????????Consle.WriteLine???????????????
for (int y = 0; y < InThelist[0]; y++) {
if (y == 0 || y == InThelist[0] - 1)
Console.WriteLine(oputputstring);
else
Console.WriteLine(outputpoint);
}
oputputstring = string.Empty;
Console.WriteLine();
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
List<int> InputList = new List<int>();
List<List<int>> ResultList = new List<List<int>>();
string oputputstring = string.Empty;
string outputpoint = string.Empty;
while (true) {
var Input = Console.ReadLine().Split(' ');
int H = int.Parse(Input[0]);
int W = int.Parse(Input[1]);
if (H == 0 && W == 0)
break;
InputList = new List<int>();
InputList.Add(H);
InputList.Add(W);
ResultList.Add(InputList);
}
foreach (var InThelist in ResultList) {
//#?????°?????£????????????(W)
for (int x = 0; x < InThelist[1]; x++) {
oputputstring += "#";
}
//???#???#?????¨?????¨???????????????????????????
for (int z = 0; z < InThelist[1]; z++) {
if (z == 0 || z == InThelist[1] - 1)
outputpoint += "#";
else
outputpoint += ".";
}
//?????????Consle.WriteLine???????????????
for (int y = 0; y < InThelist[0]; y++) {
if (y == 0 || y == InThelist[0] - 1)
Console.WriteLine(oputputstring);
else
Console.WriteLine(outputpoint);
}
oputputstring = string.Empty;
outputpoint = string.Empty;
Console.WriteLine();
}
}
}
}
|
[["+", 0, 210, 8, 196, 0, 1, 0, 11, 31, 22], ["+", 8, 196, 0, 1, 0, 11, 0, 202, 0, 32], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 205, 199], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 0, 131], ["+", 8, 196, 0, 1, 0, 11, 12, 214, 141, 22], ["+", 8, 196, 0, 210, 8, 196, 0, 1, 0, 35]]
| 8
| 318
| 6
|
using System;
class Program {
static void Main() {
while (true) {
string[] raw = Console.ReadLine().Split(' ');
if (raw[0] == "0")
break;
int h = int.Parse(raw[0]);
int w = int.Parse(raw[1]);
for (int x = 0; x < w; x++)
Console.Write('#');
Console.WriteLine();
for (int y = 1; y < h - 1; y++) {
Console.Write('#');
for (int x = 1; x < w - 1; x++)
Console.Write('.');
Console.WriteLine('#');
}
for (int x = 0; x < w; x++)
Console.Write('#');
Console.WriteLine();
}
}
}
|
using System;
class Program {
static void Main() {
while (true) {
string[] raw = Console.ReadLine().Split(' ');
if (raw[0] == "0")
break;
int h = int.Parse(raw[0]);
int w = int.Parse(raw[1]);
for (int x = 0; x < w; x++)
Console.Write('#');
Console.WriteLine();
for (int y = 1; y < h - 1; y++) {
Console.Write('#');
for (int x = 1; x < w - 1; x++)
Console.Write('.');
Console.WriteLine('#');
}
for (int x = 0; x < w; x++)
Console.Write('#');
Console.WriteLine();
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
| 196
| 6
|
using System;
using System.Linq;
namespace _5_C {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
for (int i = 0; i < x[0]; i++) {
for (int I = 0; I < x[1]; I++) {
if ((I + i) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
}
}
}
}
|
using System;
using System.Linq;
namespace _5_C {
class Program {
static void Main(string[] args) {
while (true) {
int[] x = Console.ReadLine().Split().Select(int.Parse).ToArray();
if (x[0] == 0 && x[1] == 0) {
break;
}
for (int i = 0; i < x[0]; i++) {
for (int I = 0; I < x[1]; I++) {
if ((I + i) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
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
| 158
| 6
|
using System;
namespace ITP1_5_C {
class Program {
static void Main() {
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 i = 0; i < h; i++) {
for (int j = 0; j < h; j++) {
if ((i + j) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
}
|
using System;
namespace ITP1_5_C {
class Program {
static void Main() {
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 i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
//(奇数行かつ奇数列)または(偶数行かつ偶数列)の場合、行番号i+列番号j=偶数
//(奇数行かつ偶数列)または(偶数行かつ奇数列)の場合、行番号i+列番号j=奇数
if ((i + j) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
}
}
|
[["-", 0, 7, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 196, 0, 7, 15, 16, 12, 22]]
| 8
| 160
| 2
|
using System;
using System.Linq;
namespace AOJ_Practice {
class Program {
static void Main(string[] args) {
while (true) {
var inputs = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
if (inputs.All(x => x == 0)) {
goto Finish;
}
var height = inputs[0];
var width = inputs[1];
for (int i = 0; i < height; i++) {
var firstChar = i % 2 == 0 ? '#' : '.';
var secondChar = i % 2 == 0 ? '.' : '#';
for (int j = 0; j < width; j++) {
Console.Write(j % 2 == 0 ? firstChar : secondChar);
}
}
Console.WriteLine();
}
Finish:
return;
}
}
}
|
using System;
using System.Linq;
namespace AOJ_Practice {
class Program {
static void Main(string[] args) {
while (true) {
var inputs = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
if (inputs.All(x => x == 0)) {
goto Finish;
}
var height = inputs[0];
var width = inputs[1];
for (int i = 0; i < height; i++) {
var firstChar = i % 2 == 0 ? '#' : '.';
var secondChar = i % 2 == 0 ? '.' : '#';
for (int j = 0; j < width; j++) {
Console.Write(j % 2 == 0 ? firstChar : secondChar);
}
Console.WriteLine();
}
Console.WriteLine();
}
Finish:
return;
}
}
}
|
[["+", 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, 7, 8, 196, 0, 1, 0, 35]]
| 8
| 185
| 6
|
using System;
namespace PrintCheckboard {
class MainClass {
public static void Main(string[] args) {
while (true) {
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
int height, Wide;
height = int.Parse(tmp[0]);
Wide = int.Parse(tmp[1]);
if (height == 0 && Wide == 0)
break;
for (int i = 0; i < height; i++) {
for (int j = 0; j < Wide; j++) {
Console.Write(((i * height + j) % 2 == 0) ? "#" : ".");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
using System;
namespace PrintCheckboard {
class MainClass {
public static void Main(string[] args) {
while (true) {
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
int height, Wide;
height = int.Parse(tmp[0]);
Wide = int.Parse(tmp[1]);
if (height == 0 && Wide == 0)
break;
for (int i = 0; i < height; i++) {
for (int j = 0; j < Wide; j++) {
Console.Write(((i + j) % 2 == 0) ? "#" : ".");
}
Console.Write("\n");
}
Console.Write("\n");
}
}
}
}
|
[["-", 31, 16, 31, 23, 0, 16, 31, 16, 17, 48], ["-", 31, 16, 31, 23, 0, 16, 31, 16, 12, 22]]
| 8
| 169
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ITP1_5 {
class Program {
static void Main(string[] args) {
while (true) {
string[] strArray = Console.ReadLine().Split(' ');
int height = int.Parse(strArray[0]);
int width = int.Parse(strArray[1]);
if (height == 0 && width == 0) {
break;
}
string line0 = "";
string line1 = "";
bool even = true;
for (int i = 0; i < width; ++i) {
if (even) {
line0 += '#';
line1 += '.';
} else {
line0 += '.';
line1 += '#';
}
even = !even;
}
even = true;
for (int i = 0; i < width; ++i) {
if (even) {
Console.WriteLine(line0);
} else {
Console.WriteLine(line1);
}
even = !even;
}
Console.WriteLine();
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ITP1_5 {
class Program {
static void Main(string[] args) {
while (true) {
string[] strArray = Console.ReadLine().Split(' ');
int height = int.Parse(strArray[0]);
int width = int.Parse(strArray[1]);
if (height == 0 && width == 0) {
break;
}
string line0 = "";
string line1 = "";
bool even = true;
for (int i = 0; i < width; ++i) {
if (even) {
line0 += '#';
line1 += '.';
} else {
line0 += '.';
line1 += '#';
}
even = !even;
}
even = true;
for (int i = 0; i < height; ++i) {
if (even) {
Console.WriteLine(line0);
} else {
Console.WriteLine(line1);
}
even = !even;
}
Console.WriteLine();
}
}
}
}
|
[["-", 0, 52, 8, 196, 0, 7, 15, 16, 12, 22], ["+", 0, 52, 8, 196, 0, 7, 15, 16, 12, 22]]
| 8
| 228
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication30 {
class Program {
static void Main(string[] args) {
while (true) {
var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
int a = ab[0];
int b = ab[1];
{
if (a == 0 && b == 0)
break;
{
for (int c = 1; c <= a; c++) {
for (int d = 1; d <= b; d++) {
if ((c + d) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
}
}
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication30 {
class Program {
static void Main(string[] args) {
while (true) {
var ab = Console.ReadLine().Split().Select(int.Parse).ToArray();
int a = ab[0];
int b = ab[1];
{
if (a == 0 && b == 0)
break;
{
for (int c = 1; c <= a; c++) {
for (int d = 1; d <= b; d++) {
if ((c + d) % 2 == 0) {
Console.Write("#");
} else {
Console.Write(".");
}
}
Console.WriteLine();
}
}
}
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
| 174
| 6
|
using System;
class ITP1_5_C {
public static void Main() {
while (true) {
string[] Input = Console.ReadLine().Split(' ');
int H = int.Parse(Input[0]);
int W = int.Parse(Input[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if ((i + j) % 2 == 0)
Console.Write("#");
else
Console.Write(".");
}
Console.WriteLine();
}
}
}
}
|
using System;
class ITP1_5_C {
public static void Main() {
while (true) {
string[] Input = Console.ReadLine().Split(' ');
int H = int.Parse(Input[0]);
int W = int.Parse(Input[1]);
if (H == 0 && W == 0)
break;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if ((i + j) % 2 == 0)
Console.Write("#");
else
Console.Write(".");
}
Console.WriteLine();
}
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
| 146
| 6
|
using System;
using System.Collections.Generic;
class Program {
static void Main() {
int H = 0;
int W = 0;
List<int> Hnum = new List<int>();
List<int> Wnum = new List<int>();
while (true) {
HandW(ref H, ref W);
if (H == 0 && W == 0)
break;
Hnum.Add(H);
Wnum.Add(W);
}
for (int i = 0; i <= Wnum.Count - 1; i++)
{
for (int i1 = 0; i1 <= Hnum[i]; i1++) {
if (i1 % 2 == 0) {
for (int i2 = 0; i2 <= Wnum[i]; i2++) {
if (i2 % 2 == 0)
Console.Write("#");
else
Console.Write(".");
}
} else {
for (int i2 = 0; i2 <= Wnum[i]; i2++) {
if (i2 % 2 == 0)
Console.Write(".");
else
Console.Write("#");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
static void HandW(ref int x, ref int y) {
string[] str = Console.ReadLine().Split(' ');
x = int.Parse(str[0]);
y = int.Parse(str[1]);
}
}
|
using System;
using System.Collections.Generic;
class Program {
static void Main() {
int H = 0;
int W = 0;
List<int> Hnum = new List<int>();
List<int> Wnum = new List<int>();
while (true) {
HandW(ref H, ref W);
if (H == 0 && W == 0)
break;
Hnum.Add(H);
Wnum.Add(W);
}
for (int i = 0; i <= Wnum.Count - 1; i++)
{
for (int i1 = 0; i1 <= Hnum[i] - 1; i1++) {
if (i1 % 2 == 0) {
for (int i2 = 0; i2 <= Wnum[i] - 1; i2++) {
if (i2 % 2 == 0)
Console.Write("#");
else
Console.Write(".");
}
} else {
for (int i2 = 0; i2 <= Wnum[i] - 1; i2++) {
if (i2 % 2 == 0)
Console.Write(".");
else
Console.Write("#");
}
}
Console.WriteLine();
}
Console.WriteLine();
}
}
static void HandW(ref int x, ref int y) {
string[] str = Console.ReadLine().Split(' ');
x = int.Parse(str[0]);
y = int.Parse(str[1]);
}
}
|
[["+", 8, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["+", 64, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 64, 196, 0, 7, 15, 16, 12, 16, 12, 203], ["+", 75, 196, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 75, 196, 0, 7, 15, 16, 12, 16, 12, 203]]
| 8
| 312
| 6
|
using System;
namespace ITP1_5_C {
class Program {
static void Main(string[] args) {
while (true) {
string[] s = Console.ReadLine().Split(' ');
int H = int.Parse(s[0]), W = int.Parse(s[1]);
if (H == 0 && W == 0)
break;
string a = "";
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i % 2 == 0) {
if (j == 0 || j % 2 == 0) {
a = a.Insert(a.Length, "#");
} else {
a = a.Insert(a.Length, ".");
}
} else {
if (j == 0 || j % 2 == 0) {
a = a.Insert(a.Length, ".");
} else {
a = a.Insert(a.Length, "#");
}
}
}
Console.WriteLine(a);
a = "";
Console.WriteLine();
}
}
}
}
}
|
using System;
namespace ITP1_5_C {
class Program {
static void Main(string[] args) {
while (true) {
string[] s = Console.ReadLine().Split(' ');
int H = int.Parse(s[0]), W = int.Parse(s[1]);
if (H == 0 && W == 0)
break;
string a = "";
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
if (i == 0 || i % 2 == 0) {
if (j == 0 || j % 2 == 0) {
a = a.Insert(a.Length, "#");
} else {
a = a.Insert(a.Length, ".");
}
} else {
if (j == 0 || j % 2 == 0) {
a = a.Insert(a.Length, ".");
} else {
a = a.Insert(a.Length, "#");
}
}
}
Console.WriteLine(a);
a = "";
}
Console.WriteLine();
}
}
}
}
|
[["+", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46], ["-", 0, 52, 8, 196, 0, 7, 8, 196, 0, 46]]
| 8
| 250
| 2
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
// List<int> a = new List<int>();
// List<int> b = new List<int>();
// string[] s = Console.ReadLine().Split(' ');
// long a = long.Parse(s[0]);
double a = double.Parse(Console.ReadLine());
Console.WriteLine("{0} {1}", 2.0 * a * Math.PI, a * a * Math.PI);
// Console.WriteLine("");
}
}
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
// List<int> a = new List<int>();
// List<int> b = new List<int>();
// string[] s = Console.ReadLine().Split(' ');
// long a = long.Parse(s[0]);
double a = double.Parse(Console.ReadLine());
Console.WriteLine("{0} {1}", a * a * Math.PI, (double)2 * a * Math.PI);
// Console.WriteLine("");
}
}
|
[["-", 3, 4, 0, 28, 0, 16, 31, 16, 31, 250], ["+", 3, 4, 0, 28, 0, 16, 31, 16, 31, 22], ["-", 3, 4, 0, 28, 0, 16, 31, 16, 31, 22], ["+", 0, 28, 0, 16, 31, 16, 31, 74, 0, 24], ["+", 0, 28, 0, 16, 31, 16, 31, 74, 39, 199], ["+", 0, 28, 0, 16, 31, 16, 31, 74, 0, 25], ["+", 0, 28, 0, 16, 31, 16, 31, 74, 51, 203]]
| 8
| 69
| 7
|
using System;
namespace AizuOnlineJudge {
class Program {
static void Main(string[] args) {
var num = int.Parse(Console.ReadLine());
Console.WriteLine(Calc(num));
}
static string Calc(int num) {
double area = (num ^ 2) * Math.PI;
double length = (num * 2) * Math.PI;
return area + " " + length;
}
}
}
|
using System;
namespace AizuOnlineJudge {
class Program {
static void Main(string[] args) {
var num = double.Parse(Console.ReadLine());
Console.WriteLine(Calc(num));
}
static string Calc(double num) {
double area = (num * num) * Math.PI;
double length = (num * 2) * Math.PI;
return area + " " + length;
}
}
}
|
[["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["-", 8, 201, 0, 195, 54, 55, 0, 220, 39, 199], ["+", 8, 201, 0, 195, 54, 55, 0, 220, 39, 199], ["+", 0, 212, 0, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 212, 0, 16, 31, 23, 0, 16, 17, 48], ["-", 0, 212, 0, 16, 31, 23, 0, 16, 17, 140], ["-", 0, 212, 0, 16, 31, 23, 0, 16, 12, 203]]
| 8
| 90
| 8
|
using System;
class Program {
static void Main() {
double r = double.Parse(Console.ReadLine());
//面積
double a = r * r * 3.14;
//円周
double b = (r + r) * 3.14;
string result = string.Format("{0:f6} {1:f6}", a, b);
Console.WriteLine(result);
}
}
|
using System;
class Program {
static void Main() {
double r = double.Parse(Console.ReadLine());
//面積
double a = r * r * Math.PI;
//円周
double b = (r + r) * Math.PI;
string result = string.Format("{0:f6} {1:f6}", a, b);
Console.WriteLine(result);
}
}
|
[["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 250], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 205, 22], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 0, 131], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 141, 22]]
| 8
| 73
| 8
|
using System;
namespace ConsoleApp__ITP1_4_B {
class Program {
static void Main(string[] args) {
double radiusr = double.Parse(Console.ReadLine());
double circumference = 2 * radiusr * Math.PI;
double area = radiusr * radiusr * Math.PI;
Console.WriteLine("{0:F6} {1:F6}", circumference, area);
}
}
}
|
using System;
namespace ConsoleApp__ITP1_4_B {
class Program {
static void Main(string[] args) {
double radiusr = double.Parse(Console.ReadLine());
double circumference = 2 * radiusr * Math.PI;
double area = radiusr * radiusr * Math.PI;
Console.WriteLine("{0:F6} {1:F6}", area, circumference);
}
}
}
|
[["-", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22], ["-", 8, 196, 0, 1, 0, 213, 3, 4, 0, 21], ["+", 8, 196, 0, 1, 0, 213, 3, 4, 0, 21], ["+", 0, 1, 0, 213, 3, 4, 0, 28, 0, 22]]
| 8
| 71
| 4
|
using System;
class Program {
static void Main(string[] args) {
double r, circleArea, circumference;
string num = Console.ReadLine();
r = double.Parse(num);
circleArea = r * r * 3.14;
circumference = r * r * 3.14;
Console.Write("{0:0.000000}", circleArea + " ");
Console.WriteLine("{0:0.000000}", circumference);
}
}
|
using System;
class Program {
static void Main(string[] args) {
double r, circleArea, circumference;
string num = Console.ReadLine();
r = double.Parse(num);
circleArea = r * r * 3.141592653589;
circumference = r * 2 * 3.141592653589;
Console.Write("{0:0.000000}", circleArea + " ");
Console.WriteLine("{0:0.000000}", circumference);
}
}
|
[["-", 8, 196, 0, 1, 0, 11, 12, 16, 12, 250], ["+", 8, 196, 0, 1, 0, 11, 12, 16, 12, 250], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 203]]
| 8
| 85
| 6
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
double r = double.Parse(Console.ReadLine());
double a = r * 2 * 3.141592653589;
double b = r * r * 3.141592653589;
Console.WriteLine(a.ToString("F8") + " " + b.ToString("F8"));
}
}
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
double r = double.Parse(Console.ReadLine());
double a = r * r * 3.141592653589;
double b = r * 2 * 3.141592653589;
Console.WriteLine(a.ToString("F8") + " " + b.ToString("F8"));
}
}
|
[["-", 0, 200, 0, 212, 0, 16, 31, 16, 12, 203], ["+", 0, 200, 0, 212, 0, 16, 31, 16, 12, 22], ["-", 0, 200, 0, 212, 0, 16, 31, 16, 12, 22], ["+", 0, 200, 0, 212, 0, 16, 31, 16, 12, 203]]
| 8
| 84
| 4
|
using System;
class Circle {
public static void Main() {
var r = double.Parse(Console.ReadLine());
Console.WriteLine("{0:d6} {1:d6}", r * r * Math.PI, 2 * Math.PI * r);
}
}
|
using System;
class Circle {
public static void Main() {
var r = double.Parse(Console.ReadLine());
Console.WriteLine("{0:f6} {1:f6}", r * r * Math.PI, 2 * Math.PI * r);
}
}
|
[["-", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222], ["+", 0, 213, 3, 4, 0, 28, 0, 5, 0, 222]]
| 8
| 54
| 2
|
using System;
namespace ConsoleApp48 {
class Program {
static void Main(string[] args) {
double r = double.Parse(Console.ReadLine());
double area = r * r * 3.14;
double enshu = 2 * r * 3.14;
Console.WriteLine("{0} {1}", area, enshu);
}
}
}
|
using System;
namespace ConsoleApp48 {
class Program {
static void Main(string[] args) {
double r = double.Parse(Console.ReadLine());
double area = r * r * Math.PI;
double enshu = 2 * r * Math.PI;
Console.WriteLine("{0} {1}", area, enshu);
}
}
}
|
[["-", 0, 198, 0, 200, 0, 212, 0, 16, 12, 250], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 205, 22], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 0, 131], ["+", 0, 200, 0, 212, 0, 16, 12, 214, 141, 22]]
| 8
| 67
| 8
|
using System;
namespace SimpleCalc {
class MainClass {
public static void Main(string[] args) {
double a, b, ans = 0;
string[] data;
while (true) {
data = Console.ReadLine().Split(" ".ToCharArray());
a = double.Parse(data[0]);
b = double.Parse(data[2]);
if (string.Compare(data[1], "?") == 0)
break;
switch (data[1]) {
case "+":
ans = a + b;
break;
case "-":
ans = a - b;
break;
case "*":
ans = a * b;
break;
case "/":
ans = a / b;
break;
}
Console.WriteLine(ans);
}
}
}
}
|
using System;
namespace SimpleCalc {
class MainClass {
public static void Main(string[] args) {
double a, b, ans = 0;
string[] data;
while (true) {
data = Console.ReadLine().Split(" ".ToCharArray());
a = double.Parse(data[0]);
b = double.Parse(data[2]);
if (string.Compare(data[1], "?") == 0)
break;
switch (data[1]) {
case "+":
ans = a + b;
break;
case "-":
ans = a - b;
break;
case "*":
ans = a * b;
break;
case "/":
ans = a / b;
break;
}
Console.WriteLine((int)ans);
}
}
}
}
|
[["+", 0, 213, 3, 4, 0, 28, 0, 74, 0, 24], ["+", 0, 213, 3, 4, 0, 28, 0, 74, 39, 199], ["+", 0, 213, 3, 4, 0, 28, 0, 74, 0, 25]]
| 8
| 174
| 3
|
using System;
namespace Test {
class MainClass {
public static void Main(string[] args) {
var input = Console.ReadLine().Split(' ');
var a = int.Parse(input[0]);
var op = input[1];
var b = int.Parse(input[2]);
var result = 0;
switch (op) {
case "+":
result = a + b;
break;
case "-":
result = a - b;
break;
case "*":
result = a * b;
break;
case "/":
result = a / b;
break;
default:
return;
}
Console.WriteLine(result);
}
}
}
|
using System;
namespace Test {
class MainClass {
public static void Main(string[] args) {
while (true) {
var input = Console.ReadLine().Split(' ');
var a = int.Parse(input[0]);
var op = input[1];
var b = int.Parse(input[2]);
var result = 0;
switch (op) {
case "+":
result = a + b;
break;
case "-":
result = a - b;
break;
case "*":
result = a * b;
break;
case "/":
result = a / b;
break;
default:
return;
}
Console.WriteLine(result);
}
}
}
}
|
[["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 89], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 24], ["+", 0, 195, 8, 196, 0, 52, 15, 211, 0, 146], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 25], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 45], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 46]]
| 8
| 147
| 6
|
using System;
class program {
public static int Main() {
bool flag = true;
while (flag) {
var str = Console.ReadLine();
var a = int.Parse(str.Split(' ')[0]);
var op = str.Split(' ')[1];
var b = int.Parse(str.Split(' ')[1]);
switch (op) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a * b);
break;
case "/":
Console.WriteLine(a / b);
break;
case "?":
flag = false;
break;
}
}
return 0;
}
}
|
using System;
class program {
public static int Main() {
bool flag = true;
while (flag) {
var str = Console.ReadLine();
var a = int.Parse(str.Split(' ')[0]);
var op = str.Split(' ')[1];
var b = int.Parse(str.Split(' ')[2]);
switch (op) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a * b);
break;
case "/":
Console.WriteLine(a / b);
break;
case "?":
flag = false;
break;
}
}
return 0;
}
}
|
[["-", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203], ["+", 0, 28, 0, 204, 206, 207, 0, 28, 0, 203]]
| 8
| 174
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SimpleCalculator {
class Program {
static void Main(string[] args) {
while (true) {
string line = Console.ReadLine();
string[] strs = line.Split(' ');
int lValue = int.Parse(strs[0]);
string op = strs[1];
int rValue = int.Parse(strs[2]);
SimpleCalculator problem = new SimpleCalculator();
if (op.Equals("?"))
break;
int answer = 0;
if (op.Equals("+"))
answer = problem.Sum(lValue, rValue);
if (op.Equals("-"))
answer = problem.Sub(lValue, rValue);
if (op.Equals("*"))
answer = problem.Mul(lValue, rValue);
if (op.Equals("/"))
answer = problem.Div(lValue, rValue);
Console.WriteLine(answer);
}
}
}
/// <summary>
/// 単純な計算機クラス
/// </summary>
public class SimpleCalculator {
public int Sum(int lValue, int rValue) { return lValue + rValue; }
public int Sub(int lValue, int rValue) { return lValue + rValue; }
public int Mul(int lValue, int rValue) { return lValue * rValue; }
public int Div(int lValue, int rValue) { return lValue / rValue; }
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace SimpleCalculator {
class Program {
static void Main(string[] args) {
while (true) {
string line = Console.ReadLine();
string[] strs = line.Split(' ');
int lValue = int.Parse(strs[0]);
string op = strs[1];
int rValue = int.Parse(strs[2]);
SimpleCalculator problem = new SimpleCalculator();
if (op.Equals("?"))
break;
int answer = 0;
if (op.Equals("+"))
answer = problem.Sum(lValue, rValue);
if (op.Equals("-"))
answer = problem.Sub(lValue, rValue);
if (op.Equals("*"))
answer = problem.Mul(lValue, rValue);
if (op.Equals("/"))
answer = problem.Div(lValue, rValue);
Console.WriteLine(answer);
}
}
}
/// <summary>
/// 単純な計算機クラス
/// </summary>
public class SimpleCalculator {
public int Sum(int lValue, int rValue) { return lValue + rValue; }
public int Sub(int lValue, int rValue) { return lValue - rValue; }
public int Mul(int lValue, int rValue) { return lValue * rValue; }
public int Div(int lValue, int rValue) { return lValue / rValue; }
}
}
|
[["-", 0, 195, 8, 196, 0, 37, 0, 16, 17, 72], ["+", 0, 195, 8, 196, 0, 37, 0, 16, 17, 33]]
| 8
| 299
| 2
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
String[] str = Console.ReadLine().Split(' ');
int a = int.Parse(str[0]);
String op = str[1];
int b = int.Parse(str[2]);
int x = 0;
while (op != "?") {
if (op == "+") {
x = a + b;
} else if (op != "-") {
x = a - b;
} else if (op != "*") {
x = a * b;
} else if (op != "/") {
x = a / b;
}
Console.WriteLine(x);
str = Console.ReadLine().Split(' ');
a = int.Parse(str[0]);
op = str[1];
b = int.Parse(str[2]);
}
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
String[] str = Console.ReadLine().Split(' ');
int a = int.Parse(str[0]);
String op = str[1];
int b = int.Parse(str[2]);
int x = 0;
while (op != "?") {
if (op == "+") {
x = a + b;
} else if (op == "-") {
x = a - b;
} else if (op == "*") {
x = a * b;
} else if (op == "/") {
x = a / b;
}
Console.WriteLine(x);
str = Console.ReadLine().Split(' ');
a = int.Parse(str[0]);
op = str[1];
b = int.Parse(str[2]);
}
}
}
}
|
[["-", 8, 196, 0, 57, 75, 57, 15, 16, 17, 79], ["+", 8, 196, 0, 57, 75, 57, 15, 16, 17, 60], ["-", 0, 57, 75, 57, 75, 57, 15, 16, 17, 79], ["+", 0, 57, 75, 57, 75, 57, 15, 16, 17, 60], ["-", 75, 57, 75, 57, 75, 57, 15, 16, 17, 79], ["+", 75, 57, 75, 57, 75, 57, 15, 16, 17, 60]]
| 8
| 221
| 6
|
using System;
namespace AizuOnLine {
class Program {
static void Main(string[] args) {
var data = Console.ReadLine().Split(' ');
var num1 = Convert.ToInt32(data[0]);
var num2 = Convert.ToInt32(data[2]);
var op = data[1];
if (op == "?") {
return;
}
int ans = 0;
if (op == "+") {
ans = num1 + num2;
} else if (op == "-") {
ans = num1 - num2;
} else if (op == "*") {
ans = num1 * num2;
} else {
ans = num1 / num2;
}
Console.WriteLine(ans);
}
}
}
|
using System;
namespace AizuOnLine {
class Program {
static void Main(string[] args) {
while (true) {
var data = Console.ReadLine().Split(' ');
var num1 = Convert.ToInt32(data[0]);
var num2 = Convert.ToInt32(data[2]);
var op = data[1];
if (op == "?") {
return;
}
int ans = 0;
if (op == "+") {
ans = num1 + num2;
} else if (op == "-") {
ans = num1 - num2;
} else if (op == "*") {
ans = num1 * num2;
} else {
ans = num1 / num2;
}
Console.WriteLine(ans);
}
}
}
}
|
[["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 89], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 24], ["+", 0, 195, 8, 196, 0, 52, 15, 211, 0, 146], ["+", 8, 201, 0, 195, 8, 196, 0, 52, 0, 25], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 45], ["+", 0, 195, 8, 196, 0, 52, 8, 196, 0, 46]]
| 8
| 155
| 6
|
using System;
namespace CA {
class Program {
static void Main(string[] args) {
while (true) {
string[] s = Console.ReadLine().Split(' ');
if (s[2] == "?")
break;
decimal a = int.Parse(s[0]), b = int.Parse(s[2]);
switch (s[1]) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a * b);
break;
case "/":
Console.WriteLine(a / b);
break;
}
}
}
}
}
|
using System;
namespace CA {
class Program {
static void Main(string[] args) {
while (true) {
string[] s = Console.ReadLine().Split(' ');
if (s[1] == "?")
break;
int a = int.Parse(s[0]), b = int.Parse(s[2]);
switch (s[1]) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a * b);
break;
case "/":
Console.WriteLine(a / b);
break;
}
}
}
}
}
|
[["-", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["+", 15, 16, 31, 204, 206, 207, 0, 28, 0, 203], ["-", 0, 52, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 52, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 157
| 4
|
using System;
class P {
public static void Main() {
bool y = true;
int z;
while (y) {
//????????????????????????
var x = Console.ReadLine().Split(' ');
//??????????????????
int a = Int32.Parse(x[0]);
int b = Int32.Parse(x[2]);
string op = x[1];
if (op == "+") {
z = a + b;
Console.WriteLine(z.ToString());
} else if (op == "-") {
z = a - b;
Console.WriteLine(z.ToString());
} else if (op == "*") {
z = a * b;
Console.WriteLine(z.ToString());
} else if (op == "/") {
z = a / b;
Console.WriteLine(a.ToString());
} else {
y = false;
}
}
}
}
|
using System;
class P {
public static void Main() {
bool y = true;
int z;
while (y) {
//????????????????????????
var x = Console.ReadLine().Split(' ');
//??????????????????
int a = Int32.Parse(x[0]);
int b = Int32.Parse(x[2]);
string op = x[1];
if (op == "+") {
z = a + b;
Console.WriteLine(z.ToString());
} else if (op == "-") {
z = a - b;
Console.WriteLine(z.ToString());
} else if (op == "*") {
z = a * b;
Console.WriteLine(z.ToString());
} else if (op == "/") {
z = a / b;
Console.WriteLine(z.ToString());
} else {
y = false;
}
}
}
}
|
[["-", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 205, 22]]
| 8
| 199
| 2
|
using System;
class aizu_judge {
static void Main() {
while (true) {
string[] cal = Console.ReadLine().Split();
int a = Convert.ToInt32(cal[0]);
int b = Convert.ToInt32(cal[2]);
bool endFlg = false;
switch (cal[1]) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a - b);
break;
case "/":
Console.WriteLine(a / b);
break;
default:
endFlg = true;
break;
}
if (endFlg)
break;
}
}
}
|
using System;
class aizu_judge {
static void Main() {
while (true) {
string[] cal = Console.ReadLine().Split();
int a = Convert.ToInt32(cal[0]);
int b = Convert.ToInt32(cal[2]);
bool endFlg = false;
switch (cal[1]) {
case "+":
Console.WriteLine(a + b);
break;
case "-":
Console.WriteLine(a - b);
break;
case "*":
Console.WriteLine(a * b);
break;
case "/":
Console.WriteLine(a / b);
break;
default:
endFlg = true;
break;
}
if (endFlg)
break;
}
}
}
|
[["-", 0, 213, 3, 4, 0, 28, 0, 16, 17, 33], ["+", 0, 213, 3, 4, 0, 28, 0, 16, 17, 48]]
| 8
| 153
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace AizuOnlineJudge {
class Program {
static void Main(string[] args) {
//[summary]ITP1_4_D 最小値、最大値、合計値
//コンソールの設定を変更
Console.SetIn(new StreamReader(Console.OpenStandardInput(131072),
Console.InputEncoding, false, 131072));
// 2行目の値を読み込む
string line = Console.ReadLine().TrimEnd();
line = Console.ReadLine().TrimEnd();
string[] array = line.Split(' ');
var numbers = new List<int>();
foreach (string s in array) {
try {
int num = int.Parse(s);
numbers.Add(num);
} catch (Exception) {
Console.WriteLine(s);
}
}
int min = numbers.Min();
int max = numbers.Max();
long sum = numbers.Sum();
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
namespace AizuOnlineJudge {
class Program {
static void Main(string[] args) {
//[summary]ITP1_4_D 最小値、最大値、合計値
//コンソールの設定を変更
Console.SetIn(new StreamReader(Console.OpenStandardInput(131072),
Console.InputEncoding, false, 131072));
// 2行目の値を読み込む
string line = Console.ReadLine().TrimEnd();
line = Console.ReadLine().TrimEnd();
string[] array = line.Split(' ');
var numbers = new List<long>();
foreach (string s in array) {
try {
int num = int.Parse(s);
numbers.Add(num);
} catch (Exception) {
Console.WriteLine(s);
}
}
long min = numbers.Min();
long max = numbers.Max();
// numbersの要素をlong型にしておかないと、
//結果を受け取る変数(sum)の許容範囲内の数値でも
// Sum()で合計を計算する途中でエラーが出る
long sum = numbers.Sum();
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
[["-", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["+", 0, 212, 0, 230, 39, 236, 237, 238, 0, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 200
| 6
|
using System;
using System.Linq;
namespace ITP1_4_D {
class Program {
static void Main() {
long[] x =
Console.ReadLine().Split(' ', '\r', '\n').Select(long.Parse).ToArray();
Console.WriteLine("{0} {1} {2}", x.Min(), x.Max(), x.Sum());
}
}
}
|
using System;
using System.Linq;
namespace ITP1_4_D {
class Program {
static void Main() {
Console.ReadLine();
long[] x =
Console.ReadLine().Split(' ', '\r', '\n').Select(long.Parse).ToArray();
Console.WriteLine("{0} {1} {2}", x.Min(), x.Max(), x.Sum());
}
}
}
|
[["+", 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
| 87
| 6
|
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Min__Max_and_Sum {
class Program {
static void Main(string[] args) {
int num = int.Parse(Console.ReadLine());
var ary = new int[num];
int min = 1000000;
int max = -1000000;
int sum = 0;
string st1 = Console.ReadLine();
string[] st2 = st1.Trim().Split(' ');
for (int i = 0; i < num; i++) {
ary[i] = int.Parse(st2[i]);
if (ary[i] > max) {
max = ary[i];
}
if (ary[i] < min) {
min = ary[i];
}
sum += ary[i];
}
Console.WriteLine(min + " " + max + " " + sum);
}
}
}
|
using System;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Min__Max_and_Sum {
class Program {
static void Main(string[] args) {
int num = int.Parse(Console.ReadLine());
var ary = new int[num];
int min = 1000000;
int max = -1000000;
long sum = 0;
string st1 = Console.ReadLine();
string[] st2 = st1.Trim().Split(' ');
for (int i = 0; i < num; i++) {
ary[i] = int.Parse(st2[i]);
if (ary[i] > max) {
max = ary[i];
}
if (ary[i] < min) {
min = ary[i];
}
sum += ary[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]]
| 8
| 210
| 2
|
using System;
using System.Linq;
namespace AOJ_Practice {
class Program {
static void Main(string[] args) {
var itemCount = int.Parse(Console.ReadLine());
var terms = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
var max = terms.Max();
var min = terms.Min();
var sum = terms.Sum();
Console.WriteLine($"{min} {max} {sum}");
}
}
}
|
using System;
using System.Linq;
namespace AOJ_Practice {
class Program {
static void Main(string[] args) {
var itemCount = int.Parse(Console.ReadLine());
var terms = Console.ReadLine().Split(' ').Select(long.Parse).ToList();
var max = terms.Max();
var min = terms.Min();
var sum = terms.Sum();
Console.WriteLine($"{min} {max} {sum}");
}
}
}
|
[["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
| 8
| 114
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Prac {
class Program {
static void Main(string[] args) {
Console.ReadLine();
List<int> ai = new List<int>();
ai = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
Console.WriteLine(Min(ai) + " " + Max(ai) + " " + Sum(ai));
}
private static int Sum(List<int> ai) {
int sum = 0;
for (int i = 0; i < ai.Count; i++) {
sum = sum + ai[i];
}
return sum;
}
private static int Max(List<int> ai) {
int tempMax = int.MinValue;
for (int i = 0; i < ai.Count; i++) {
if (tempMax < ai[i])
tempMax = ai[i];
}
return tempMax;
}
private static int Min(List<int> ai) {
int tempMin = int.MaxValue;
for (int i = 0; i < ai.Count; i++) {
if (tempMin > ai[i])
tempMin = ai[i];
}
return tempMin;
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Prac {
class Program {
static void Main(string[] args) {
Console.ReadLine();
List<int> ai = new List<int>();
ai = Console.ReadLine().Split(' ').Select(int.Parse).ToList();
Console.WriteLine(Min(ai) + " " + Max(ai) + " " + Sum(ai));
}
private static long Sum(List<int> ai) {
long sum = 0;
for (int i = 0; i < ai.Count; i++) {
sum = sum + ai[i];
}
return sum;
}
private static int Max(List<int> ai) {
int tempMax = int.MinValue;
for (int i = 0; i < ai.Count; i++) {
if (tempMax < ai[i])
tempMax = ai[i];
}
return tempMax;
}
private static int Min(List<int> ai) {
int tempMin = int.MaxValue;
for (int i = 0; i < ai.Count; i++) {
if (tempMin > ai[i])
tempMin = ai[i];
}
return tempMin;
}
}
}
|
[["-", 8, 201, 0, 235, 8, 201, 0, 195, 39, 199], ["+", 8, 201, 0, 235, 8, 201, 0, 195, 39, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 275
| 4
|
using System;
namespace SimpleCalc {
class MainClass {
public static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
;
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
int max, min, sum;
max = min = sum = int.Parse(tmp[0]);
for (int i = 1; i < n; i++) {
int data = int.Parse(tmp[i]);
if (max < data)
max = data;
if (min > data)
min = data;
sum += data;
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
using System;
namespace SimpleCalc {
class MainClass {
public static void Main(string[] args) {
long n = long.Parse(Console.ReadLine());
;
string[] tmp = Console.ReadLine().Split(" ".ToCharArray());
long max, min, sum;
max = min = sum = long.Parse(tmp[0]);
for (int i = 1; i < n; i++) {
long data = long.Parse(tmp[i]);
if (max < data)
max = data;
if (min > data)
min = data;
sum += data;
}
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], ["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["-", 12, 11, 12, 11, 12, 213, 63, 214, 205, 199], ["+", 12, 11, 12, 11, 12, 213, 63, 214, 205, 199], ["-", 0, 7, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 7, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 151
| 12
|
using System;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
string str1 = Console.ReadLine();
int n = int.Parse(str1);
int[] a = new int[n];
string[] str2 = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++) {
a[i] = int.Parse(str2[i]);
}
int min = a[0];
for (int i = 0; i < n; i++) {
if (a[i] < min)
min = a[i];
}
int max = a[0];
for (int i = 0; i < n; i++) {
if (a[i] > max)
max = a[i];
}
int sum = 0;
for (int i = 0; i < n; i++) {
sum += a[i];
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
using System;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
string str1 = Console.ReadLine();
int n = int.Parse(str1);
int[] a = new int[n];
string[] str2 = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++) {
a[i] = int.Parse(str2[i]);
}
int min = a[0];
for (int i = 0; i < n; i++) {
if (a[i] < min)
min = a[i];
}
int max = a[0];
for (int i = 0; i < n; i++) {
if (a[i] > max)
max = a[i];
}
long sum = 0;
for (int i = 0; i < n; i++) {
sum += a[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
| 224
| 2
|
using System;
namespace Test {
class MainClass {
public static void Main(string[] args) {
Console.ReadLine();
var inputs = Console.ReadLine().Split(' ');
var nums = Array.ConvertAll(inputs, int.Parse);
Array.Sort(nums);
var sum = 0;
Array.ForEach(nums, x => sum += x);
Console.WriteLine("{0} {1} {2}", nums[0], nums[nums.Length - 1], sum);
}
}
}
|
using System;
namespace Test {
class MainClass {
public static void Main(string[] args) {
Console.ReadLine();
var inputs = Console.ReadLine().Split(' ');
var nums = Array.ConvertAll(inputs, int.Parse);
Array.Sort(nums);
var sum = 0L;
Array.ForEach(nums, x => sum += x);
Console.WriteLine("{0} {1} {2}", nums[0], nums[nums.Length - 1], sum);
}
}
}
|
[["-", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203], ["+", 0, 197, 0, 198, 0, 200, 0, 212, 0, 203]]
| 8
| 109
| 2
|
using System;
using System.Linq;
namespace Test {
class MainClass {
public static void Main(string[] args) {
Console.ReadLine();
var inputs = Console.ReadLine().Split(' ');
var nums = Array.ConvertAll(inputs, int.Parse);
var sum = nums.Sum();
var min = nums.Min();
var max = nums.Max();
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
using System;
using System.Linq;
namespace Test {
class MainClass {
public static void Main(string[] args) {
Console.ReadLine();
var inputs = Console.ReadLine().Split(' ');
var nums = Array.ConvertAll(inputs, long.Parse);
var sum = nums.Sum();
var min = nums.Min();
var max = nums.Max();
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
[["-", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 0, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
| 8
| 106
| 2
|
using System;
class program {
public static void Main() {
int length = int.Parse(Console.ReadLine());
var str = Console.ReadLine().Split(' ');
int min = int.Parse(str[0]), max = int.Parse(str[0]),
sum = int.Parse(str[0]);
for (int i = 1; i < length; i++) {
min = min > int.Parse(str[i]) ? int.Parse(str[i]) : min;
max = max < int.Parse(str[i]) ? int.Parse(str[i]) : max;
sum += int.Parse(str[i]);
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
|
using System;
class program {
public static void Main() {
int length = int.Parse(Console.ReadLine());
var str = Console.ReadLine().Split(' ');
long min = long.Parse(str[0]), max = long.Parse(str[0]),
sum = long.Parse(str[0]);
for (int i = 1; i < length; i++) {
min = min > int.Parse(str[i]) ? int.Parse(str[i]) : min;
max = max < int.Parse(str[i]) ? int.Parse(str[i]) : max;
sum += int.Parse(str[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], ["-", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199], ["+", 0, 200, 0, 212, 0, 213, 63, 214, 205, 199]]
| 8
| 177
| 8
|
using System;
using System.Linq;
namespace Aizu {
class OnlineJudge {
public static void Main() {
Console.ReadLine();
var input = Console.ReadLine().Split().Select(p => int.Parse(p));
Console.WriteLine("{0} {1} {2}", input.Min(), input.Max(), input.Sum());
}
}
}
|
using System;
using System.Linq;
namespace Aizu {
class OnlineJudge {
public static void Main() {
Console.ReadLine();
var input = Console.ReadLine().Split().Select(p => long.Parse(p));
Console.WriteLine("{0} {1} {2}", input.Min(), input.Max(), input.Sum());
}
}
}
|
[["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199]]
| 8
| 82
| 2
|
using System;
namespace AizuOnLine {
class Program {
static void Main(string[] args) {
Console.ReadLine();
var data = Console.ReadLine().Split(' ');
int min = 1000000;
int max = -1000000;
int sum = 0;
for (int i = 0; i < data.Length; i++) {
int num = Convert.ToInt32(data[i]);
sum += num;
min = Math.Min(min, num);
max = Math.Max(max, num);
}
Console.WriteLine(min + " " + max + " " + sum);
}
}
}
|
using System;
namespace AizuOnLine {
class Program {
static void Main(string[] args) {
Console.ReadLine();
var data = Console.ReadLine().Split(' ');
int min = 1000000;
int max = -1000000;
long sum = 0;
for (int i = 0; i < data.Length; i++) {
int num = Convert.ToInt32(data[i]);
sum += num;
min = Math.Min(min, num);
max = Math.Max(max, num);
}
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]]
| 8
| 136
| 2
|
using System;
namespace AOJ.ITP {
public class MinMaxSum {
public static void Main() {
int num_cnt = int.Parse(Console.ReadLine());
var input = Console.ReadLine().Split(' ');
int min_val = int.MaxValue;
int max_val = int.MinValue;
int sum = 0;
for (int i = 0; i < num_cnt; i++) {
int val = int.Parse(input[i]);
min_val = Math.Min(min_val, val);
max_val = Math.Max(max_val, val);
sum += val;
}
Console.WriteLine(string.Format("{0} {1} {2}", min_val, max_val, sum));
}
}
}
|
using System;
namespace AOJ.ITP {
public class MinMaxSum {
public static void Main() {
int num_cnt = int.Parse(Console.ReadLine());
var input = Console.ReadLine().Split(' ');
int min_val = int.MaxValue;
int max_val = int.MinValue;
long sum = 0;
for (int i = 0; i < num_cnt; i++) {
int val = int.Parse(input[i]);
min_val = Math.Min(min_val, val);
max_val = Math.Max(max_val, val);
sum += val;
}
Console.WriteLine(string.Format("{0} {1} {2}", min_val, max_val, sum));
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 146
| 2
|
using System;
using System.Collections.Generic;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
int len = Convert.ToInt32(Console.ReadLine());
List<int> numbers = new List<int>(len);
String[] inputs = Console.ReadLine().Split(' ');
for (int i = 0; i < len; i++)
numbers.Add(Convert.ToInt32(inputs[i]));
numbers.Sort();
int sum = 0;
foreach (var num in numbers)
sum += num;
Console.WriteLine(numbers[0] + " " + numbers[len - 1] + " " + sum);
}
}
}
|
using System;
using System.Collections.Generic;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
int len = Convert.ToInt32(Console.ReadLine());
List<long> numbers = new List<long>(len);
String[] inputs = Console.ReadLine().Split(' ');
for (int i = 0; i < len; i++)
numbers.Add(Convert.ToInt64(inputs[i]));
numbers.Sort();
long sum = 0;
foreach (var num in numbers)
sum += num;
Console.WriteLine(numbers[0] + " " + numbers[len - 1] + " " + 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, 141, 22], ["+", 3, 4, 0, 28, 0, 213, 63, 214, 141, 22], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 154
| 8
|
public partial class IntroductionToProgramming {
public static void Main() {
System.Console.ReadLine();
string[] line = System.Console.ReadLine().Split(' ');
decimal min = 10000;
decimal max = -10000;
decimal sum = 0;
foreach (string s in line) {
decimal decS = decimal.Parse(s);
min = decS < min ? decS : min;
max = max < decS ? decS : max;
sum += decS;
}
System.Console.WriteLine(min.ToString("0") + " " + max.ToString("0") + " " +
sum.ToString("0"));
}
}
|
public partial class IntroductionToProgramming {
public static void Main() {
System.Console.ReadLine();
string[] line = System.Console.ReadLine().Split(' ');
decimal min = 1000000;
decimal max = -1000000;
decimal sum = 0;
foreach (string s in line) {
decimal decS = decimal.Parse(s);
min = decS < min ? decS : min;
max = max < decS ? decS : max;
sum += decS;
}
System.Console.WriteLine(min.ToString("0") + " " + max.ToString("0") + " " +
sum.ToString("0"));
}
}
|
[["-", 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, 203], ["+", 0, 198, 0, 200, 0, 212, 0, 241, 0, 203]]
| 8
| 143
| 4
|
using System;
using System.Linq;
class ITP1 {
static void Main() {
{
int a = int.Parse(Console.ReadLine());
string[] num = Console.ReadLine().Split(' ');
int max = int.Parse(num[0]);
int min = max;
int sum = 0;
for (int i = 0; i < a; i++) {
int b = int.Parse(num[i]);
if (b < min) {
min = b;
}
if (b > max) {
max = b;
}
sum += b;
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
using System;
using System.Linq;
class ITP1 {
static void Main() {
{
int a = int.Parse(Console.ReadLine());
string[] num = Console.ReadLine().Split(' ');
int max = int.Parse(num[0]);
int min = max;
long sum = 0;
for (int i = 0; i < a; i++) {
int b = int.Parse(num[i]);
if (b < min) {
min = b;
}
if (b > max) {
max = b;
}
sum += b;
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
}
|
[["-", 8, 196, 0, 196, 0, 197, 0, 198, 39, 199], ["+", 8, 196, 0, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 148
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
String str = Console.ReadLine();
int n = int.Parse(str);
String[] Array = Console.ReadLine().Split(' ');
int[] dateArray = new int[Array.Length];
for (int i = 0; i < Array.Length; ++i) {
dateArray[i] = int.Parse(Array[i]);
}
int sum = 0;
int small = 0;
for (int j = 0; j < n; ++j) {
sum += dateArray[j];
if (dateArray[small] > dateArray[j]) {
small = j;
}
}
int big = 0;
for (int b = 0; b < n; ++b) {
if (dateArray[big] < dateArray[b]) {
big = b;
}
}
Console.WriteLine("{0} {1} {2}", dateArray[small], dateArray[big], sum);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
String str = Console.ReadLine();
int n = int.Parse(str);
String[] Array = Console.ReadLine().Split(' ');
int[] dateArray = new int[Array.Length];
for (int i = 0; i < Array.Length; ++i) {
dateArray[i] = int.Parse(Array[i]);
}
long sum = 0;
int small = 0;
for (int j = 0; j < n; ++j) {
sum += dateArray[j];
if (dateArray[small] > dateArray[j]) {
small = j;
}
}
int big = 0;
for (int b = 0; b < n; ++b) {
if (dateArray[big] < dateArray[b]) {
big = b;
}
}
Console.WriteLine("{0} {1} {2}", dateArray[small], dateArray[big], sum);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 233
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ITP1_4D {
class Program {
static void Main(string[] args) {
string inputText = Console.ReadLine();
int n = int.Parse(inputText);
inputText = Console.ReadLine();
string[] words = inputText.Split(' ');
if (words.Length < n) {
return;
}
int[] intArray = new int[n];
for (int i = 0; i < n; ++i) {
intArray[i] = int.Parse(words[i]);
}
int minIndex = 0;
int maxIndex = 0;
int sum = 0;
for (int i = 0; i < intArray.Length; ++i) {
sum += intArray[i];
if (intArray[i] < intArray[minIndex]) {
minIndex = i;
}
if (intArray[maxIndex] < intArray[i]) {
maxIndex = i;
}
}
Console.WriteLine("{0} {1} {2}", intArray[minIndex], intArray[maxIndex],
sum);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ITP1_4D {
class Program {
static void Main(string[] args) {
string inputText = Console.ReadLine();
int n = int.Parse(inputText);
inputText = Console.ReadLine();
string[] words = inputText.Split(' ');
if (words.Length < n) {
return;
}
int[] intArray = new int[n];
for (int i = 0; i < n; ++i) {
intArray[i] = int.Parse(words[i]);
}
int minIndex = 0;
int maxIndex = 0;
long sum = 0;
for (int i = 0; i < intArray.Length; ++i) {
sum += intArray[i];
if (intArray[i] < intArray[minIndex]) {
minIndex = i;
}
if (intArray[maxIndex] < intArray[i]) {
maxIndex = i;
}
}
Console.WriteLine("{0} {1} {2}", intArray[minIndex], intArray[maxIndex],
sum);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 231
| 2
|
using System;
class Program {
static void Main() {
Console.ReadLine();
int a = 0;
string[] sD = Console.ReadLine().Split(' ');
int[] D = new int[sD.Length];
for (int i = 0; i < sD.Length; i++) {
D[i] = int.Parse(sD[i]);
}
Array.Sort(D);
for (int i = 0; i < D.Length; i++) {
a += D[i];
}
Console.WriteLine("{0} {1} {2}", D[0], D[D.Length - 1], a);
}
}
|
using System;
class Program {
static void Main() {
Console.ReadLine();
long a = 0;
string[] sD = Console.ReadLine().Split(' ');
int[] D = new int[sD.Length];
for (int i = 0; i < sD.Length; i++) {
D[i] = int.Parse(sD[i]);
}
Array.Sort(D);
for (int i = 0; i < D.Length; i++) {
a += D[i];
}
Console.WriteLine("{0} {1} {2}", D[0], D[D.Length - 1], a);
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 146
| 2
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
// n??¨ai?????????????????????
string s = Console.ReadLine();
string[] ai = Console.ReadLine().Split(' ');
int n = int.Parse(s);
int first = int.Parse(ai[0]);
//?????§?????¨????°??????¨????¨????????´????????????°(?????????ai???????´?????????????)
int max = first, min = first, sum = first;
//????´??????°???????????????
for (int i = 1; i < n; i++) {
int a = int.Parse(ai[i]);
//?????§????????????
if (max < a)
max = a;
//????°?????????????
if (min > a)
min = a;
//????¨??????????????????????
sum = sum + a;
}
//????????¨???
Console.WriteLine(string.Format("{0} {1} {2}", min, max, sum));
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
// n??¨ai?????????????????????
string s = Console.ReadLine();
string[] ai = Console.ReadLine().Split(' ');
int n = int.Parse(s);
int first = int.Parse(ai[0]);
//?????§?????¨????°??????¨????¨????????´????????????°(?????????ai???????´?????????????)
int max = first, min = first;
//????¨????????´????????????°
long sum = first;
//????´??????°???????????????
for (int i = 1; i < n; i++) {
int a = int.Parse(ai[i]);
//?????§????????????
if (max < a)
max = a;
//????°?????????????
if (min > a)
min = a;
//????¨??????????????????????
sum = sum + a;
}
//????????¨???
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
| 179
| 3
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication4 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine(); //?????????
int count = int.Parse(s); // 5
int max = int.MinValue;
int min = int.MaxValue;
long total = 0;
string[] ss = Console.ReadLine().Split(' ');
for (int i = 0; i < count; i++) {
int value = int.Parse(ss[i]);
if (max < value)
max = value;
if (min > value)
min = value;
total = total + value;
}
Console.WriteLine(max + " " + min + " " + total);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication4 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine(); //?????????
int count = int.Parse(s); // 5
int max = int.MinValue;
int min = int.MaxValue;
long total = 0;
string[] ss = Console.ReadLine().Split(' ');
for (int i = 0; i < count; i++) {
int value = int.Parse(ss[i]);
if (max < value)
max = value;
if (min > value)
min = value;
total = total + value;
}
Console.WriteLine(min + " " + max + " " + total);
}
}
}
|
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 28, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 28, 0, 16, 31, 16, 31, 16, 12, 22]]
| 8
| 166
| 4
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication7 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine();
int n = int.Parse(s);
int max = int.MinValue;
int min = int.MaxValue;
long total = 0;
string[] ss = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++) {
int value = int.Parse(ss[i]);
if (max < value) {
max = value;
}
if (min > value) {
min = value;
total = total + value;
}
}
Console.WriteLine(max + " " + min + " " + total);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication7 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine();
int n = int.Parse(s);
int max = int.MinValue;
int min = int.MaxValue;
long total = 0;
string[] ss = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++) {
int value = int.Parse(ss[i]);
if (max < value)
max = value;
if (min > value)
min = value;
total = total + value;
}
Console.WriteLine(min + " " + max + " " + total);
}
}
}
|
[["-", 0, 7, 8, 196, 0, 57, 64, 196, 0, 45], ["-", 0, 7, 8, 196, 0, 57, 64, 196, 0, 46], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 28, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 28, 0, 16, 31, 16, 31, 16, 12, 22]]
| 8
| 168
| 8
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
String[] str = Console.ReadLine().Split(' ');
long[] a = new long[n];
long max = long.MinValue, min = long.MaxValue, sum = 0;
for (int i = 0; i < n; i++) {
a[i] = long.Parse(str[i]);
sum = sum + a[i];
}
for (int i = 0; i < n; i++) {
if (n == 1) {
min = a[0];
max = a[0];
sum = a[0];
} else if (max < a[i]) {
max = a[i];
} else if (min > a[i]) {
min = a[i];
}
}
Console.WriteLine(min + " " + max + " " + sum);
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication9 {
class Program {
static void Main(string[] args) {
int n = int.Parse(Console.ReadLine());
String[] str = Console.ReadLine().Split(' ');
long[] a = new long[n];
long max = long.MinValue, min = long.MaxValue, sum = 0;
for (int i = 0; i < n; i++) {
a[i] = long.Parse(str[i]);
sum = sum + a[i];
}
for (int i = 0; i < n; i++) {
if (n == 1) {
min = a[0];
max = a[0];
sum = a[0];
}
if (max < a[i]) {
max = a[i];
}
if (min > a[i]) {
min = a[i];
}
}
Console.WriteLine(min + " " + max + " " + sum);
}
}
}
|
[["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 57, 0, 95]]
| 8
| 236
| 2
|
using System;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine();
int n = int.Parse(s);
string[] t = Console.ReadLine().Split();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = int.Parse(t[i]);
}
int max = int.MinValue;
int min = int.MaxValue;
int average = 0;
for (int i = 0; i < n; i++) {
if (max < a[i]) {
max = a[i];
}
if (min > a[i]) {
min = a[i];
}
average += a[i];
}
Console.WriteLine(min + " " + max + " " + average);
}
}
}
|
using System;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
string s = Console.ReadLine();
int n = int.Parse(s);
string[] t = Console.ReadLine().Split();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = int.Parse(t[i]);
}
int max = int.MinValue;
int min = int.MaxValue;
long average = 0;
for (int i = 0; i < n; i++) {
if (max < a[i]) {
max = a[i];
}
if (min > a[i]) {
min = a[i];
}
average += a[i];
}
Console.WriteLine(min + " " + max + " " + average);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 195
| 2
|
using System;
using System.Linq;
class main {
public static void Main() {
int n = int.Parse(Console.ReadLine());
int[] a = new int[n];
string[] e = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++)
a[i] = int.Parse(e[i]);
Console.WriteLine("{0} {1} {2}", a.Min(), a.Max(), a.Sum());
}
}
|
using System;
using System.Linq;
class main {
public static void Main() {
int n = int.Parse(Console.ReadLine());
long[] a = new long[n];
string[] e = Console.ReadLine().Split(' ');
for (int i = 0; i < n; i++)
a[i] = long.Parse(e[i]);
Console.WriteLine("{0} {1} {2}", a.Min(), a.Max(), a.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], ["-", 8, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 8, 1, 0, 11, 12, 213, 63, 214, 205, 199]]
| 8
| 119
| 6
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
String strCount = Console.ReadLine();
int count = int.Parse(strCount);
String[] str = Console.ReadLine().Split(' ');
int max = int.Parse(str[0]);
int min = int.Parse(str[0]);
int sum = 0;
for (int i = 0; i < count; i++) {
if (max < int.Parse(str[i])) {
max = int.Parse(str[i]);
}
if (min > int.Parse(str[i])) {
min = int.Parse(str[i]);
}
sum += int.Parse(str[i]);
}
Console.WriteLine("{0} {1} {2}", min, max, sum);
}
}
|
using System;
using System.Collections.Generic;
class Program {
static void Main(string[] args) {
String strCount = Console.ReadLine();
int count = int.Parse(strCount);
String[] str = Console.ReadLine().Split(' ');
int max = int.Parse(str[0]);
int min = int.Parse(str[0]);
long sum = 0;
for (int i = 0; i < count; i++) {
if (max < int.Parse(str[i])) {
max = int.Parse(str[i]);
}
if (min > int.Parse(str[i])) {
min = int.Parse(str[i]);
}
sum += int.Parse(str[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
| 192
| 2
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
int.Parse(Console.ReadLine());
int[] nums =
Array.ConvertAll(Console.ReadLine().Split(' '),
new Converter<string, int>(s => int.Parse(s)));
Console.WriteLine("{0} {1} {2}", nums.Min(), nums.Max(), nums.Sum());
}
}
}
|
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
int.Parse(Console.ReadLine());
long[] nums =
Array.ConvertAll(Console.ReadLine().Split(' '),
new Converter<string, long>(s => long.Parse(s)));
Console.WriteLine("{0} {1} {2}", nums.Min(), nums.Max(), nums.Sum());
}
}
}
|
[["-", 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
| 118
| 6
|
using System;
using System.Linq;
public class Hello {
public static void Main() {
string tmp = System.Console.ReadLine();
int max_index = Convert.ToInt32(tmp);
string line = System.Console.ReadLine();
string[] ab = line.Split(' ');
int[] a = new int[max_index];
for (int i = 0; i < max_index; i++) {
a[i] = Convert.ToInt32(ab[i]);
}
int max_value = a.Max();
int min_value = a.Min();
int sum_value = a.Sum();
Console.WriteLine("{0} {1} {2}", min_value, max_value, sum_value);
}
}
|
using System;
using System.Linq;
public class Hello {
public static void Main() {
string tmp = System.Console.ReadLine();
int max_index = Convert.ToInt32(tmp);
string line = System.Console.ReadLine();
string[] ab = line.Split(' ');
long[] a = new long[max_index];
for (int i = 0; i < max_index; i++) {
a[i] = Convert.ToInt64(ab[i]);
}
long max_value = a.Max();
long min_value = a.Min();
long sum_value = a.Sum();
Console.WriteLine("{0} {1} {2}", min_value, max_value, sum_value);
}
}
|
[["-", 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, 1, 0, 11, 12, 213, 63, 214, 141, 22], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 141, 22], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 151
| 12
|
using System;
using System.Collections.Generic;
namespace ConsoleApplication18 {
class Program {
static void Main(string[] args) {
string str = Console.ReadLine();
int n = int.Parse(str);
string[] str2 = Console.ReadLine().Split(' ');
int total = 0;
int min = int.Parse(str2[0]);
int max = int.Parse(str2[0]);
for (int i = 0; i < n; i++) {
int num = int.Parse(str2[i]);
total = total + num;
if (max < num) {
max = num;
}
if (min > num) {
min = num;
}
}
Console.WriteLine("{0} {1} {2}", min, max, total);
}
}
}
|
using System;
using System.Collections.Generic;
namespace ConsoleApplication18 {
class Program {
static void Main(string[] args) {
string str = Console.ReadLine();
int n = int.Parse(str);
string[] str2 = Console.ReadLine().Split(' ');
long total = 0;
int min = int.Parse(str2[0]);
int max = int.Parse(str2[0]);
for (int i = 0; i < n; i++) {
int num = int.Parse(str2[i]);
total = total + num;
if (max < num) {
max = num;
}
if (min > num) {
min = num;
}
}
Console.WriteLine("{0} {1} {2}", min, max, total);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 171
| 2
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] arggs) {
System.Console.ReadLine();
var r = System.Console.ReadLine()
.Split(new char[] { ' ' })
.Select(s => int.Parse(s))
.ToArray<int>();
System.Console.WriteLine("{0} {1} {2}", r.Min(), r.Max(), r.Sum());
}
}
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2 {
class Program {
static void Main(string[] arggs) {
System.Console.ReadLine();
var r = System.Console.ReadLine()
.Split(new char[] { ' ' })
.Select(s => long.Parse(s))
.ToArray<long>();
System.Console.WriteLine("{0} {1} {2}", r.Min(), r.Max(), r.Sum());
}
}
}
|
[["-", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["+", 0, 28, 0, 218, 8, 213, 63, 214, 205, 199], ["-", 0, 213, 63, 214, 141, 236, 237, 238, 0, 199], ["+", 0, 213, 63, 214, 141, 236, 237, 238, 0, 199]]
| 8
| 119
| 4
|
using System;
public class Test {
public static void Main() {
// your code goes here
Console.ReadLine();
string[] s = Console.ReadLine().Split(' ');
int[] n = new int[s.Length];
for (int i = 0; i < s.Length; i++) {
n[i] = int.Parse(s[i]);
}
Array.Sort(n);
int sum = 0;
foreach (var num in n) {
sum += num;
}
Console.WriteLine("{0} {1} {2}", n[0], n[n.Length - 1], sum);
}
}
|
using System;
public class Test {
public static void Main() {
// your code goes here
Console.ReadLine();
string[] s = Console.ReadLine().Split(' ');
long[] n = new long[s.Length];
for (int i = 0; i < s.Length; i++) {
n[i] = long.Parse(s[i]);
}
Array.Sort(n);
long sum = 0;
foreach (var num in n) {
sum += num;
}
Console.WriteLine("{0} {1} {2}", n[0], n[n.Length - 1], 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, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["+", 0, 1, 0, 11, 12, 213, 63, 214, 205, 199], ["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 137
| 8
|
using System;
class Program {
static void Main(string[] args) {
// Input CInput = new Input();
// double 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_double();
// input = CInput.Multiline_int(' ' ,2, ref num);
var input = Console.ReadLine();
int num = int.Parse(input);
input = Console.ReadLine();
var split = input.Split(' ');
int[] spliti = new int[10000];
for (int i = 0; i < num; i++) {
spliti[i] = int.Parse(split[i]);
}
int min = spliti[0], max = spliti[0], sum = 0;
for (int i = 0; i < num; i++) {
if (min > spliti[i])
min = spliti[i];
if (max < spliti[i])
max = spliti[i];
sum += spliti[i];
}
System.Console.WriteLine("{0} {1} {2}", min, max, sum);
}
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();
// double 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_double();
// input = CInput.Multiline_int(' ' ,2, ref num);
var input = Console.ReadLine();
int num = int.Parse(input);
input = Console.ReadLine();
var split = input.Split(' ');
int[] spliti = new int[10000];
for (int i = 0; i < num; i++) {
spliti[i] = int.Parse(split[i]);
}
int min = spliti[0], max = spliti[0];
Int64 sum = 0;
for (int i = 0; i < num; i++) {
if (min > spliti[i])
min = spliti[i];
if (max < spliti[i])
max = spliti[i];
sum += spliti[i];
}
System.Console.WriteLine("{0} {1} {2}", min, max, sum);
}
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;
}
}
}
|
[["-", 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, 22]]
| 8
| 621
| 3
|
using System;
using System.Linq;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
int number = int.Parse(Console.ReadLine());
int[] data = new int[number];
data =
Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
int max = int.MinValue;
int min = int.MaxValue;
int sum = 0;
foreach (var i in data) {
if (max < i)
max = i;
if (i < min)
min = i;
sum += i;
}
Console.WriteLine(min + " " + max + " " + sum);
}
}
}
|
using System;
using System.Linq;
namespace ITP1_4_D {
class Program {
static void Main(string[] args) {
int number = int.Parse(Console.ReadLine());
int[] data = new int[number];
data =
Console.ReadLine().Split(' ').Select(x => Convert.ToInt32(x)).ToArray();
int max = int.MinValue;
int min = int.MaxValue;
long sum = 0;
foreach (var i in data) {
if (max < i)
max = i;
if (i < min)
min = i;
sum += 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]]
| 8
| 154
| 2
|
using System;
class Program {
static void Main() {
int i = 0, Max = 0, Min = 0;
ulong Sum = 0;
int n = int.Parse(Console.ReadLine());
string[] a = Console.ReadLine().Split(' ');
do {
int x = int.Parse(a[i]);
if (i == 0) {
Max = x;
Min = x;
Sum += (ulong)x;
} else if (i > 0 & x > Max) {
Max = x;
Sum += (ulong)x;
} else if (i > 0 & x < Min) {
Min = x;
Sum += (ulong)x;
} else
Sum += (ulong)x;
i++;
} while (i < n);
Console.WriteLine("{0} {1} {2}", Min, Max, Sum);
}
}
|
using System;
class Program {
static void Main() {
int i = 0, Max = 0, Min = 0;
long Sum = 0;
int n = int.Parse(Console.ReadLine());
string[] a = Console.ReadLine().Split(' ');
do {
int x = int.Parse(a[i]);
if (i == 0) {
Max = x;
Min = x;
Sum += (long)x;
} else if (i > 0 & x > Max) {
Max = x;
Sum += (long)x;
} else if (i > 0 & x < Min) {
Min = x;
Sum += (long)x;
} else
Sum += (long)x;
i++;
} while (i < n);
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], ["-", 64, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["+", 64, 196, 0, 1, 0, 11, 12, 74, 39, 199], ["-", 75, 57, 75, 1, 0, 11, 12, 74, 39, 199], ["+", 75, 57, 75, 1, 0, 11, 12, 74, 39, 199]]
| 8
| 184
| 10
|
using System;
using System.Collections.Generic;
namespace ITP1_4_D {
class Problem {
public static List<string[]> getinputdata() {
List<string[]> list_temp = new List<string[]>();
string strdata = Console.ReadLine();
while (strdata != null) {
string[] s_temp = strdata.Split(' ');
list_temp.Add(s_temp);
strdata = Console.ReadLine();
}
return list_temp;
}
public static void Main(string[] args) {
List<string[]> list_result = new List<string[]>();
list_result = getinputdata();
int n = int.Parse(list_result[0][0]);
string[] a = list_result[1];
int maxdata = -1000000;
int mindata = 1000000;
int mysum = 0;
for (int i = 0; i < n; i++) {
mysum += int.Parse(a[i]);
if (maxdata < int.Parse(a[i])) {
maxdata = int.Parse(a[i]);
}
if (mindata > int.Parse(a[i])) {
mindata = int.Parse(a[i]);
}
}
Console.WriteLine("{0} {1} {2}", mindata, maxdata, mysum);
}
}
}
|
using System;
using System.Collections.Generic;
namespace ITP1_4_D {
class Problem {
public static List<string[]> getinputdata() {
List<string[]> list_temp = new List<string[]>();
string strdata = Console.ReadLine();
while (strdata != null) {
string[] s_temp = strdata.Split(' ');
list_temp.Add(s_temp);
strdata = Console.ReadLine();
}
return list_temp;
}
public static void Main(string[] args) {
List<string[]> list_result = new List<string[]>();
list_result = getinputdata();
int n = int.Parse(list_result[0][0]);
string[] a = list_result[1];
int maxdata = -1000000;
int mindata = 1000000;
long mysum = 0;
for (int i = 0; i < n; i++) {
mysum += int.Parse(a[i]);
if (maxdata < int.Parse(a[i])) {
maxdata = int.Parse(a[i]);
}
if (mindata > int.Parse(a[i])) {
mindata = int.Parse(a[i]);
}
}
Console.WriteLine("{0} {1} {2}", mindata, maxdata, mysum);
}
}
}
|
[["-", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199], ["+", 0, 195, 8, 196, 0, 197, 0, 198, 39, 199]]
| 8
| 275
| 2
|
using System;
using System.Linq;
namespace Ex160424_1 {
public class Program {
public static void Main(string[] args) {
Console.ReadLine();
var an = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
Console.WriteLine("{0} {1} {2}", an.Min(), an.Max(), an.Sum());
}
}
}
|
using System;
using System.Linq;
namespace Ex160424_1 {
public class Program {
public static void Main(string[] args) {
Console.ReadLine();
var an = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
Console.WriteLine("{0} {1} {2}", an.Min(), an.Max(), an.Sum());
}
}
}
|
[["-", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199], ["+", 205, 213, 3, 4, 0, 28, 0, 214, 205, 199]]
| 8
| 89
| 2
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.