結果

問題 No.1461 しあはせや歩みゆく?
ユーザー ks2mks2m
提出日時 2021-04-02 21:22:28
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 4,512 ms
コンパイル使用メモリ 70,968 KB
実行使用メモリ 56,448 KB
最終ジャッジ日時 2023-08-25 11:17:57
合計ジャッジ時間 8,635 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,500 KB
testcase_01 AC 122 ms
54,004 KB
testcase_02 AC 122 ms
55,900 KB
testcase_03 AC 122 ms
55,524 KB
testcase_04 AC 120 ms
55,996 KB
testcase_05 AC 119 ms
56,112 KB
testcase_06 AC 122 ms
55,668 KB
testcase_07 AC 121 ms
55,636 KB
testcase_08 AC 120 ms
56,448 KB
testcase_09 AC 120 ms
55,636 KB
testcase_10 AC 123 ms
55,824 KB
testcase_11 AC 122 ms
55,268 KB
testcase_12 AC 121 ms
55,716 KB
testcase_13 AC 122 ms
55,300 KB
testcase_14 AC 120 ms
55,652 KB
testcase_15 AC 119 ms
55,896 KB
testcase_16 AC 119 ms
55,852 KB
testcase_17 AC 119 ms
56,284 KB
testcase_18 AC 120 ms
55,612 KB
testcase_19 AC 123 ms
55,256 KB
testcase_20 AC 121 ms
55,460 KB
testcase_21 AC 121 ms
56,408 KB
testcase_22 AC 121 ms
56,312 KB
testcase_23 AC 121 ms
55,652 KB
testcase_24 AC 119 ms
56,116 KB
testcase_25 AC 120 ms
56,040 KB
testcase_26 AC 120 ms
55,272 KB
testcase_27 AC 121 ms
55,924 KB
testcase_28 AC 120 ms
55,776 KB
testcase_29 AC 122 ms
55,972 KB
testcase_30 AC 125 ms
55,736 KB
testcase_31 AC 120 ms
56,032 KB
testcase_32 AC 121 ms
54,100 KB
testcase_33 AC 121 ms
55,656 KB
testcase_34 AC 120 ms
56,116 KB
testcase_35 AC 121 ms
55,624 KB
testcase_36 AC 121 ms
55,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		sc.close();

		if (n <= 3) {
			System.out.println(n);
		} else {
			long n2 = n - 3;
			long ans = n2 * 5 + 3;
			System.out.println(ans);
		}
	}
}
0