結果
問題 | No.293 4>7の世界 |
ユーザー |
|
提出日時 | 2023-07-27 16:06:01 |
言語 | C# (.NET 8.0.404) |
結果 |
WA
|
実行時間 | - |
コード長 | 719 bytes |
コンパイル時間 | 11,207 ms |
コンパイル使用メモリ | 170,068 KB |
実行使用メモリ | 185,620 KB |
最終ジャッジ日時 | 2024-10-04 13:26:47 |
合計ジャッジ時間 | 10,021 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 17 WA * 3 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.csproj を復元しました (85 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/
ソースコード
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;}}}