結果
問題 | No.197 手品 |
ユーザー |
|
提出日時 | 2023-08-31 10:08:24 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 31 ms / 1,000 ms |
コード長 | 1,246 bytes |
コンパイル時間 | 1,228 ms |
コンパイル使用メモリ | 114,348 KB |
実行使用メモリ | 19,328 KB |
最終ジャッジ日時 | 2025-01-03 04:29:50 |
合計ジャッジ時間 | 3,635 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 43 |
コンパイルメッセージ
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("SUCCESS"); } 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"); } } } } }