結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
rocoder
|
| 提出日時 | 2017-07-26 05:27:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 1,000 ms |
| コード長 | 373 bytes |
| コンパイル時間 | 99 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-10-09 17:32:12 |
| 合計ジャッジ時間 | 1,570 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#class change
N,M=(int(i) for i in input().split())
X,Y=(int(i) for i in input().split())
def c(nu,cl):
cy=nu//cl
# print (cy)
nu%=cl
# print (nu)
# if nu==0:
# nu+=cl
if cy%2==1:
nu*=-1
nu+=cl+1
if nu>cl:
nu=cl
if nu==0:
nu=1
return nu
if c(X,M)==c(Y,M):
print("YES")
else:
print("NO")
rocoder