結果

問題 No.441 和か積
ユーザー furuya1223
提出日時 2016-11-11 22:24:25
言語 C#
(csc 3.100.19.26603)
結果
AC  
実行時間 24 ms
コード長 1,662 Byte
コンパイル時間 572 ms
使用メモリ 8,832 KB
最終ジャッジ日時 2019-09-07 20:10:56

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
99_system_test1.txt AC 23 ms
8,820 KB
99_system_test2.txt AC 23 ms
8,820 KB
99_system_test3.txt AC 23 ms
8,824 KB
99_system_test4.txt AC 23 ms
8,828 KB
99_system_test5.txt AC 23 ms
8,832 KB
99_system_test6.txt AC 23 ms
8,824 KB
99_system_test7.txt AC 23 ms
8,816 KB
99_system_test8.txt AC 24 ms
8,816 KB
a_sample1.in AC 22 ms
8,824 KB
a_sample2.in AC 23 ms
8,824 KB
a_sample3.in AC 23 ms
8,820 KB
b_custom1.in AC 24 ms
8,832 KB
b_custom2.in AC 23 ms
8,820 KB
b_custom3.in AC 24 ms
8,828 KB
b_custom4.in AC 24 ms
8,828 KB
b_custom5.in AC 24 ms
8,820 KB
b_custom6.in AC 24 ms
8,820 KB
b_custom7.in AC 23 ms
8,824 KB
b_custom8.in AC 21 ms
8,824 KB
b_custom9.in AC 24 ms
8,816 KB
c_large1.in AC 23 ms
8,828 KB
c_large2.in AC 23 ms
8,832 KB
c_large3.in AC 23 ms
8,824 KB
c_large4.in AC 23 ms
8,824 KB
c_large5.in AC 24 ms
8,824 KB
c_large6.in AC 23 ms
8,828 KB
c_large7.in AC 24 ms
8,828 KB
challenge01.txt AC 23 ms
8,816 KB
d_random1.in AC 23 ms
8,824 KB
d_random2.in AC 22 ms
8,820 KB
d_random3.in AC 23 ms
8,828 KB
d_random4.in AC 23 ms
8,832 KB
d_random5.in AC 24 ms
8,828 KB
テストケース一括ダウンロード
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 2.8.2.62916 (2ad4aabc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;

using Pair = System.Collections.Generic.KeyValuePair<int, int>;

class Program
{
	public Program() { }

	static void Main(string[] args)
	{
		new Program().prog();
	}
	Scanner cin;
	const int MOD = 1000000007;
	const int INF = int.MaxValue - 10;
	const long INFL = long.MaxValue - 10;
	const double EPS = 1e-7;
	const double PI = 3.1415926536;

	void prog()
	{
		cin = new Scanner();
		int[,] dir8 = new int[8, 2] { { -1, -1 }, { -1, 0 }, { -1, 1 }, { 0, -1 }, { 0, 1 }, { 1, -1 }, { 1, 0 }, { 1, 1 } };
		int[,] dir4 = new int[4, 2] { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 } };

		string A = cin.next();
		string B = cin.next();

		if (A == "0")
		{
			if (B == "0")
			{
				Console.WriteLine("E");
			}
			else
			{
				Console.WriteLine("S");
			}
		}
		else if (B == "0")
		{
			Console.WriteLine("S");
		}
		else if (A == "1" || B == "1")
		{
			Console.WriteLine("S");
		}
		else if (A == "2" && B == "2")
		{
			Console.WriteLine("E");
		}
		else
		{
			Console.WriteLine("P");
		}
	}
}

class Scanner
{
	string[] s;
	int i;

	char[] cs = new char[] { ' ' };

	public Scanner()
	{
		s = new string[0];
		i = 0;
	}

	public string next()
	{
		if (i < s.Length) return s[i++];
		string st = Console.ReadLine();
		while (st == "") st = Console.ReadLine();
		s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
		i = 0;
		return next();
	}

	public int nextInt()
	{
		return int.Parse(next());
	}

	public long nextLong()
	{
		return long.Parse(next());
	}

	public double nextDouble()
	{
		return double.Parse(next());
	}
}
0