結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
しらゆき
|
| 提出日時 | 2015-11-19 13:17:22 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 5,000 ms |
| コード長 | 657 bytes |
| 記録 | |
| コンパイル時間 | 993 ms |
| コンパイル使用メモリ | 108,728 KB |
| 実行使用メモリ | 26,664 KB |
| 最終ジャッジ日時 | 2025-10-24 20:55:07 |
| 合計ジャッジ時間 | 2,505 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
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()
{
int n = int.Parse(Console.ReadLine());
string s = "";
int up = 0;
for(int i=0;i< n; i++)
{
string[] str = Console.ReadLine().Split();
for(int j = 0; j < 3; j++)
{
if (str[j] == "10") str[j] = "0";
}
s += str[0] + str[1] + str[2];
}
for(int i = 0; i <= 9; i++)
{
int t = s.Length - s.Replace(i.ToString(), "").Length;
if (t > 1) up += t / 2;
}
up += (s.Length - up * 2) / 4;
Console.WriteLine(up);
}
}
しらゆき