結果
問題 | No.197 手品 |
ユーザー |
![]() |
提出日時 | 2015-11-24 00:25:55 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 24 ms / 1,000 ms |
コード長 | 944 bytes |
コンパイル時間 | 1,987 ms |
コンパイル使用メモリ | 103,424 KB |
実行使用メモリ | 17,792 KB |
最終ジャッジ日時 | 2024-07-20 03:43:56 |
合計ジャッジ時間 | 4,369 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; class Program { static void Main() { string sb = Console.ReadLine(); int n = int.Parse(Console.ReadLine()); string sa = Console.ReadLine(); int cntb = 0; int cnta = 0; for(int i = 0; i < 3; i++) { if (sb[i] == 'o') cntb++; } for (int i = 0; i < 3; i++) { if (sa[i] == 'o') cnta++; } if (cntb != cnta) { Console.WriteLine("SUCCESS"); return; } string ans = "FAILURE"; if (n == 0) { if (sa != sb) ans = "SUCCESS"; } else if (n == 1) { string sc = sb[1].ToString() + sb[0].ToString() + sb[2].ToString(); string sd = sb[0].ToString() + sb[2].ToString() + sb[1].ToString(); if (sa != sc && sa != sd) ans = "SUCCESS"; } Console.WriteLine(ans); } }