結果
問題 |
No.63 ポッキーゲーム
|
ユーザー |
![]() |
提出日時 | 2019-04-09 14:33:25 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 772 bytes |
コンパイル時間 | 870 ms |
コンパイル使用メモリ | 106,964 KB |
実行使用メモリ | 26,120 KB |
最終ジャッジ日時 | 2024-07-01 23:00:53 |
合計ジャッジ時間 | 2,268 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 17 WA * 5 |
コンパイルメッセージ
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が余る場合 int ans = 0; if (L % K != 0) { ans = K * ((L / K) / 2); } //L/Kが余らない場合 else if (L % K == 0) { ans = (K * ((L / K) / 2)) - K; } //表示 Console.WriteLine(ans); } } }