結果

問題 No.185 和風
ユーザー RinRin
提出日時 2015-08-27 16:45:58
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 438 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 5,336 KB
実行使用メモリ 12,040 KB
最終ジャッジ日時 2023-09-25 18:54:03
合計ジャッジ時間 734 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,720 KB
testcase_01 AC 19 ms
12,040 KB
testcase_02 AC 18 ms
11,780 KB
testcase_03 AC 17 ms
11,768 KB
testcase_04 AC 18 ms
11,912 KB
testcase_05 AC 17 ms
11,728 KB
testcase_06 AC 19 ms
11,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (foo (read))
     )
  (let loop((X (read)) (Y (read)) (Ans -1))
    (if (eof-object? X)
        (System.out.println Ans)
        (if (> (- Y X) 0) 
           (if (and (>= Ans 0) (not (= Ans (- Y X))))
               (System.out.println -1)
               (loop (read) (read) (- Y X))
           )
       (System.out.println -1)
      )
    )
  )
)
0