結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
|
提出日時 | 2019-07-30 16:57:27 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 297 bytes |
コンパイル時間 | 91 ms |
コンパイル使用メモリ | 5,376 KB |
実行使用メモリ | 16,000 KB |
最終ジャッジ日時 | 2024-07-05 00:44:45 |
合計ジャッジ時間 | 1,604 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
(define (solve a b c d) (let ([n (max 0 (- (min b d) (max a c) -1))] [ab (- b a -1)] [cd (- d c -1)]) (+ (* n (- cd 1)) (* (- ab n) cd)))) (define (main args) (let* ([a (read)] [b (read)] [c (read)] [d (read)]) (print (solve a b c d))) 0)