結果
問題 |
No.29 パワーアップ
|
ユーザー |
![]() |
提出日時 | 2015-11-19 13:17:22 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 27 ms / 5,000 ms |
コード長 | 657 bytes |
コンパイル時間 | 857 ms |
コンパイル使用メモリ | 107,040 KB |
実行使用メモリ | 26,140 KB |
最終ジャッジ日時 | 2024-09-13 17:01:32 |
合計ジャッジ時間 | 2,160 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); } }