結果

問題 No.293 4>7の世界
ユーザー 抹茶アイス抹茶アイス
提出日時 2023-07-27 16:06:01
言語 C#
(.NET 8.0.203)
結果
WA  
実行時間 -
コード長 719 bytes
コンパイル時間 7,281 ms
コンパイル使用メモリ 164,408 KB
実行使用メモリ 184,632 KB
最終ジャッジ日時 2024-04-15 03:26:54
合計ジャッジ時間 9,394 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 52 ms
30,464 KB
testcase_01 AC 50 ms
30,336 KB
testcase_02 AC 50 ms
30,312 KB
testcase_03 WA -
testcase_04 AC 51 ms
30,080 KB
testcase_05 WA -
testcase_06 AC 50 ms
30,080 KB
testcase_07 AC 51 ms
30,336 KB
testcase_08 AC 52 ms
30,208 KB
testcase_09 WA -
testcase_10 AC 52 ms
30,336 KB
testcase_11 AC 51 ms
30,080 KB
testcase_12 AC 52 ms
30,336 KB
testcase_13 AC 50 ms
30,336 KB
testcase_14 AC 51 ms
30,336 KB
testcase_15 WA -
testcase_16 AC 51 ms
30,208 KB
testcase_17 AC 50 ms
30,312 KB
testcase_18 AC 50 ms
30,080 KB
testcase_19 AC 49 ms
30,336 KB
testcase_20 AC 51 ms
30,080 KB
testcase_21 AC 50 ms
30,208 KB
testcase_22 AC 50 ms
30,208 KB
testcase_23 AC 50 ms
184,632 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.csproj を復元しました (86 ms)。
MSBuild のバージョン 17.9.6+a4ecab324 (.NET)
  main -> /home/judge/data/code/bin/Release/net8.0/main.dll
  main -> /home/judge/data/code/bin/Release/net8.0/publish/

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;

namespace yukicoder
{
	public class Program
	{
		public static void Main()
		{
			var a = Console.ReadLine().Trim().Split(' ').Select(value => fs(int.Parse(value))).Distinct().ToArray();
			var k = Math.Max(a[0], a[1]);
			Console.WriteLine(fs(k));
		}
		static int fs(int a)
        {
			var k = a.ToString();
			var A = "";
			foreach(var s in k)
            {
                if (s == '7')
                {
					A += "4";
                }
				else if (s == '4')
                {
					A += "7";
                }
                else
                {
					A += s;
                }
            }
			a = int.Parse(A);
			return a;
        }
	}
}
0