結果
| 問題 |
No.333 門松列を数え上げ
|
| コンテスト | |
| ユーザー |
ルッツファン
|
| 提出日時 | 2016-01-15 23:29:36 |
| 言語 | Java (openjdk 23) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,604 bytes |
| コンパイル時間 | 3,032 ms |
| コンパイル使用メモリ | 78,260 KB |
| 実行使用メモリ | 54,188 KB |
| 最終ジャッジ日時 | 2024-09-19 19:30:40 |
| 合計ジャッジ時間 | 4,622 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 2 WA * 5 |
ソースコード
package yukicoder;
import java.util.Scanner;
public class yukicoder333 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long[] a = readLineLongArray(sc);
long count = 0;
if(a[0] < a[1]){
for(long i = a[0]-1;i>0;i--){
count++;
}
count = a[0]-1;
}else{
count = 2000000000-a[0];
}
System.out.println(count);
}
protected static long readLineLong(Scanner sc) {
return Long.parseLong(sc.nextLine());
}
protected static long[] readLineLongArray(Scanner sc) {
String split[] = sc.nextLine().split(" ");
long ret[] = new long[split.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = Long.parseLong(split[i]);
}
return ret;
}
protected static int readLineInt(Scanner sc) {
return Integer.parseInt(sc.nextLine());
}
protected static int[] readLineIntArray(Scanner sc) {
String split[] = sc.nextLine().split(" ");
int ret[] = new int[split.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = Integer.parseInt(split[i]);
}
return ret;
}
protected static double readLineDouble(Scanner sc) {
return Double.parseDouble(sc.nextLine());
}
protected static double[] readLineDoubleArray(Scanner sc) {
String split[] = sc.nextLine().split(" ");
double ret[] = new double[split.length];
for (int i = 0; i < ret.length; i++) {
ret[i] = Double.parseDouble(split[i]);
}
return ret;
}
protected static String readLineString(Scanner sc) {
return sc.nextLine();
}
protected static String[] readLineStringArray(Scanner sc) {
return sc.nextLine().split(" ");
}
}
ルッツファン