結果
問題 | No.799 赤黒かーどげぇむ |
ユーザー |
![]() |
提出日時 | 2022-05-14 23:52:54 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 129 ms / 2,000 ms |
コード長 | 531 bytes |
コンパイル時間 | 3,326 ms |
コンパイル使用メモリ | 74,832 KB |
実行使用メモリ | 54,300 KB |
最終ジャッジ日時 | 2024-07-23 11:07:12 |
合計ジャッジ時間 | 6,723 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
import java.util.*;public class Test10 {public static void main(String[] args){Scanner sc=new Scanner(System.in);String[] line;line=sc.nextLine().split(" ");int a=Integer.parseInt(line[0]);int a1=Integer.parseInt(line[1]);int b=Integer.parseInt(line[2]);int b1=Integer.parseInt(line[3]);int eq=0,tmp,tmp1;tmp=a;if(tmp<b) tmp=b;tmp1=a1;if(b1<tmp1) tmp1=b1;eq=tmp1-tmp+1;if(eq<0) eq=0;int combi=(a1-a+1)*(b1-b+1)-eq;System.out.println(combi);}}