結果

問題 No.63 ポッキーゲーム
ユーザー nanatutmc
提出日時 2019-09-26 00:41:04
言語 C
(gcc 13.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 187 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 27,776 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-22 22:12:29
合計ジャッジ時間 999 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c:3:1: warning: return type defaults to 'int' [-Wimplicit-int]
    3 | main() {
      | ^~~~

ソースコード

diff #

#include <stdio.h>

main() {
    int L, K;
    scanf("%d %d", &L, &K);

    int count = L / (K*2);
    
    if (L == (K*2)*count)
        count--;
        
    printf("%d\n", K*count);
}
0