結果
| 問題 |
No.3108 Luke or Bishop
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-18 21:25:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 388 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 10,240 KB |
| 最終ジャッジ日時 | 2025-04-18 21:25:24 |
| 合計ジャッジ時間 | 2,182 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 WA * 8 |
ソースコード
def min_moves(Gx, Gy):
# 检查 Gx 和 Gy 的奇偶性
if Gx == 0 and Gy == 0:
return 0
elif (Gx % 2 == 0 and Gy % 2 == 0) or (Gx % 2 == 1 and Gy % 2 == 1):
return 1
else:
return 2
# 读取输入
Gx, Gy = map(int, input().split())
# 计算并输出最小步数
print(min_moves(Gx, Gy))