結果

問題 No.244 ★1のグラフの問題
ユーザー nCk_cvnCk_cv
提出日時 2015-07-17 22:22:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 1,903 ms
コンパイル使用メモリ 75,552 KB
実行使用メモリ 54,300 KB
最終ジャッジ日時 2024-04-15 02:51:18
合計ジャッジ時間 3,582 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
52,764 KB
testcase_01 AC 117 ms
53,988 KB
testcase_02 AC 117 ms
53,964 KB
testcase_03 AC 121 ms
53,916 KB
testcase_04 AC 113 ms
52,988 KB
testcase_05 AC 125 ms
53,868 KB
testcase_06 AC 123 ms
54,300 KB
testcase_07 AC 121 ms
54,172 KB
testcase_08 AC 108 ms
52,856 KB
testcase_09 AC 119 ms
54,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.awt.*;
import java.awt.geom.*;
import java.io.*;
import java.util.*;
class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		if(n == 1) {
			System.out.println(1);
		}
		else if(n == 0) {
			System.out.println(0);
		}
		else {
			System.out.println(n - 1);
		}
	} 	
}
0