結果
問題 |
No.197 手品
|
ユーザー |
|
提出日時 | 2023-08-31 10:05:44 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,246 bytes |
コンパイル時間 | 4,686 ms |
コンパイル使用メモリ | 106,496 KB |
実行使用メモリ | 19,584 KB |
最終ジャッジ日時 | 2025-01-03 04:29:41 |
合計ジャッジ時間 | 6,487 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 WA * 1 |
other | AC * 39 WA * 4 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Numerics; namespace yukicoder { public class Program { public static void Main() { var b = Console.ReadLine(); var n = int.Parse(Console.ReadLine()); var a = Console.ReadLine(); if(b.Where(x =>x == 'o').Count() != a.Where(x => x == 'o').Count()) { Console.WriteLine("FAILURE"); } else if (n >= 2) { Console.WriteLine("FAILURE"); } else if (n == 0) { if (a == b) { Console.WriteLine("FAILURE"); } else { Console.WriteLine("SUCCESS"); } } else { var x = "" + b[1] + b[0] + b[2]; var y = "" + b[0] + b[2] + b[1]; if (x == a || y == a) { Console.WriteLine("FAILURE"); } else { Console.WriteLine("SUCCESS"); } } } } }