結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 19:05:16 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 422 bytes |
| コンパイル時間 | 330 ms |
| コンパイル使用メモリ | 82,060 KB |
| 実行使用メモリ | 53,580 KB |
| 最終ジャッジ日時 | 2025-06-12 19:06:09 |
| 合計ジャッジ時間 | 3,091 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 32 |
ソースコード
a, b, x0, N = map(int, input().split())
c = x0 % 2
T = (N + 1) // 2
A = N // 2
# Takahashi's p is c
if c == 0:
t_black = 0
t_white = T
else:
t_black = (T + 1) // 2
t_white = T // 2
score_t = min(t_black, t_white)
# Aoki's p is 1 - c
p_a = 1 - c
if p_a == 0:
a_black = 0
a_white = A
else:
a_black = (A + 1) // 2
a_white = A // 2
score_a = min(a_black, a_white)
print(score_t, score_a)
gew1fw