結果
| 問題 |
No.333 門松列を数え上げ
|
| コンテスト | |
| ユーザー |
kou6839
|
| 提出日時 | 2016-01-15 23:39:03 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 124 ms / 2,000 ms |
| コード長 | 772 bytes |
| コンパイル時間 | 2,272 ms |
| コンパイル使用メモリ | 75,128 KB |
| 実行使用メモリ | 54,188 KB |
| 最終ジャッジ日時 | 2024-09-19 19:33:43 |
| 合計ジャッジ時間 | 3,930 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 |
ソースコード
import java.awt.Frame;
import java.net.NetworkInterface;
import java.util.*;
public class Main {
static long gcd(long a,long b){
return b == 0 ? a : gcd(b, a%b);
}
static long lcm(long a, long b){
return a*b/gcd(a, b);
}
static int[] dx = {0,1,0,-1};//→↓←↑
static int[] dy = {1,0,-1,0};
static class Pair{
long weight,value;
public Pair(long weight,long value) {
// TODO Auto-generated constructor stub
this.weight = weight;
this.value = value;
}
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
if(a==b){
System.out.println(0);
return;
}
if(a<b){
System.out.println(b-1-1);
}else{
System.out.println(2000000000-b-1);
}
}
}
kou6839