結果

問題 No.384 マス埋めゲーム2
ユーザー MitI_7
提出日時 2016-10-05 09:57:34
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 317 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 17,444 KB
最終ジャッジ日時 2024-11-21 17:15:58
合計ジャッジ時間 23,539 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11 TLE * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    h, w, n, k = map(int, input().split())

    no = 0
    while True:
        if h == 1 and w == 1:
            break
        if h > w:
            h -= 1
        else:
            w -= 1
        no += 1
        no %= n

    print("YES" if no + 1 == k else "NO")


if __name__ == '__main__':
    main()
0