結果
問題 | No.63 ポッキーゲーム |
ユーザー |
|
提出日時 | 2017-10-01 15:19:16 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 813 ms / 5,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 3,179 ms |
コンパイル使用メモリ | 111,492 KB |
実行使用メモリ | 17,920 KB |
最終ジャッジ日時 | 2024-12-24 05:45:17 |
合計ジャッジ時間 | 7,120 ms |
ジャッジサーバーID (参考情報) |
judge2 / 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;public class Program {public static void Main(string[] args) {string[] s = Console.ReadLine().Split(' ');long l = long.Parse(s[0]);int k = int.Parse(s[1]);int len = 0;while (l > 0) {if (l - k * 2 > 0) {len += k;}l -= k * 2;}Console.WriteLine(len);}}