結果
| 問題 | No.1183 コイン遊び |
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2020-08-29 07:12:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 210 ms / 2,000 ms |
| コード長 | 576 bytes |
| 記録 | |
| コンパイル時間 | 3,383 ms |
| コンパイル使用メモリ | 102,912 KB |
| 実行使用メモリ | 96,996 KB |
| 最終ジャッジ日時 | 2026-05-09 17:57:57 |
| 合計ジャッジ時間 | 12,029 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 32 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
public class Hello
{
static void Main()
{
var n = int.Parse(Console.ReadLine().Trim());
getAns(n);
}
static void getAns (int n)
{
string[] line = Console.ReadLine().Trim().Split(' ');
string[] line2 = Console.ReadLine().Trim().Split(' ');
var count = 0;
var pre = true;
for (int i = 0; i < n; i++)
{
var t = line[i] == line2[i];
if (t && !pre) count++;
pre = t;
}
if (!pre) count++;
Console.WriteLine(count);
}
}
bluemegane