結果
問題 |
No.84 悪の算盤
|
ユーザー |
![]() |
提出日時 | 2017-01-01 16:49:54 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 23 ms / 5,000 ms |
コード長 | 951 bytes |
コンパイル時間 | 774 ms |
コンパイル使用メモリ | 110,004 KB |
実行使用メモリ | 26,120 KB |
最終ジャッジ日時 | 2024-10-13 08:59:28 |
合計ジャッジ時間 | 1,517 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Text; using System.Text.RegularExpressions; using System.Linq; class Magatro { static long R, C; static void Main() { string[] s = Console.ReadLine().Split(' '); R = int.Parse(s[0]); C = int.Parse(s[1]); if (R == C) { if (R % 2 == 0) { Console.WriteLine(R * C / 4-1); return; } else { Console.WriteLine(R * C / 4 ); return; } } else { if (R % 2 == 0 || C % 2 == 0) { Console.WriteLine(R * C / 2-1); return; } else { Console.WriteLine(R * C / 2 ); return; } } } }