結果
問題 | No.63 ポッキーゲーム |
ユーザー | ccc |
提出日時 | 2022-07-17 21:40:34 |
言語 | C# (.NET 8.0.203) |
結果 |
WA
|
実行時間 | - |
コード長 | 521 bytes |
コンパイル時間 | 14,295 ms |
コンパイル使用メモリ | 149,256 KB |
実行使用メモリ | 167,856 KB |
最終ジャッジ日時 | 2023-09-12 09:40:42 |
合計ジャッジ時間 | 16,955 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 50 ms
28,456 KB |
testcase_01 | AC | 50 ms
28,796 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | AC | 51 ms
28,548 KB |
testcase_05 | AC | 50 ms
28,496 KB |
testcase_06 | WA | - |
testcase_07 | AC | 51 ms
30,660 KB |
testcase_08 | AC | 50 ms
28,788 KB |
testcase_09 | AC | 51 ms
28,720 KB |
testcase_10 | AC | 54 ms
30,732 KB |
testcase_11 | AC | 427 ms
28,780 KB |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 66 ms
167,856 KB |
コンパイルメッセージ
Determining projects to restore... Restored /home/judge/data/code/main.csproj (in 132 ms). .NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f Copyright (C) Microsoft Corporation.All rights reserved. プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください main -> /home/judge/data/code/bin/Release/net6.0/main.dll main -> /home/judge/data/code/bin/Release/net6.0/publish/
ソースコード
using System; using System.Linq; class Program { static void Main() { var inp = Console.ReadLine().Split().Select(int.Parse).ToArray(); int lng = inp[0]; int get = inp[1]; int ans = 0, cnt = 0; while (lng > ans) { ans += get; cnt++; } var ansCnt = cnt / 2; if ( ansCnt > 1) { Console.WriteLine(ansCnt*get); } else { Console.WriteLine("0"); } } }