結果

問題 No.396 クラス替え
ユーザー neko_the_shadowneko_the_shadow
提出日時 2016-11-28 00:02:30
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 18 ms / 1,000 ms
コード長 282 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 5,308 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2023-08-18 08:37:32
合計ジャッジ時間 2,049 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,604 KB
testcase_01 AC 18 ms
11,904 KB
testcase_02 AC 18 ms
11,716 KB
testcase_03 AC 18 ms
11,596 KB
testcase_04 AC 18 ms
11,552 KB
testcase_05 AC 18 ms
11,648 KB
testcase_06 AC 17 ms
11,720 KB
testcase_07 AC 17 ms
11,848 KB
testcase_08 AC 18 ms
11,724 KB
testcase_09 AC 17 ms
11,728 KB
testcase_10 AC 18 ms
11,712 KB
testcase_11 AC 17 ms
11,544 KB
testcase_12 AC 18 ms
11,656 KB
testcase_13 AC 18 ms
11,608 KB
testcase_14 AC 18 ms
11,832 KB
testcase_15 AC 18 ms
11,700 KB
testcase_16 AC 17 ms
11,708 KB
testcase_17 AC 18 ms
11,712 KB
testcase_18 AC 18 ms
11,828 KB
testcase_19 AC 18 ms
11,720 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (f n m t)
  (let1 g (modulo t (* m 2))
    (if (< g m)
      g
      (- (- (* 2 m) 1) g))))

(define (MAIN)
  (let* ((n (read))
         (m (read))
         (x (read))
         (y (read)))
    (if (= (f n m (- x 1)) (f n m (- y 1)))
      "YES"
      "NO")))

(print (MAIN))
0