結果
| 問題 |
No.63 ポッキーゲーム
|
| コンテスト | |
| ユーザー |
_mi_lin_
|
| 提出日時 | 2019-04-09 14:51:43 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 939 bytes |
| コンパイル時間 | 3,251 ms |
| コンパイル使用メモリ | 109,544 KB |
| 実行使用メモリ | 26,940 KB |
| 最終ジャッジ日時 | 2024-07-01 23:00:51 |
| 合計ジャッジ時間 | 3,677 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 4 |
コンパイルメッセージ
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.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace No63Pokkey
{
class Program
{
static void Main(string[] args)
{
//整数の入力
string[] number = Console.ReadLine().Split(' ');
int L = int.Parse(number[0]);
int K = int.Parse(number[1]);
//L/Kが余る場合
double ans = 0;
if (L % K != 0)
{
ans = K * ((L / K) / 2);
}
//L/Kが余らない場合
else if (L % K == 0)
{
ans = (K * ((L / K) / 2)) - K;
}
//表示
if(ans <= 0)
{
Console.WriteLine("0");
}
else
{
Console.WriteLine(Math.Floor(ans));
}
}
}
}
_mi_lin_