結果

問題 No.1004 サイコロの実装 (2)
ユーザー とらすた
提出日時 2020-03-06 22:42:28
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 733 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-10-14 09:08:32
合計ジャッジ時間 2,421 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b,x,n = na()

if a%2 == 0:
    if b%2 == 1:
        print('0 0')
    else:
        p = (n+1)//4
        q = n//4
        print(str(p)+' '+str(q))
else:
    if b%2 == 0:
        if x%2 ==1:
            print('0 0')
        else:
            p = (n+1)//4
            q = n//4
            print(str(p)+' '+str(q))
    else:
        if x%2 == 1:
            p = (n+1)//4
            q = 0
            print(str(p)+' '+str(q))
        else:
            p = 0
            q = n//4
            print(str(p)+' '+str(q))
0