結果
| 問題 | No.1183 コイン遊び |
| コンテスト | |
| ユーザー |
bluemegane
|
| 提出日時 | 2020-08-29 07:12:37 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 356 ms / 2,000 ms |
| コード長 | 576 bytes |
| 記録 | |
| コンパイル時間 | 2,087 ms |
| コンパイル使用メモリ | 104,916 KB |
| 実行使用メモリ | 108,416 KB |
| 最終ジャッジ日時 | 2024-11-14 05:09:57 |
| 合計ジャッジ時間 | 12,162 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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