結果

問題 No.72 そろばん Med
ユーザー Mcpu3Mcpu3
提出日時 2018-09-07 17:16:29
言語 Java21
(openjdk 21)
結果
AC  
実行時間 117 ms / 5,000 ms
コード長 262 bytes
コンパイル時間 2,129 ms
コンパイル使用メモリ 76,644 KB
実行使用メモリ 56,428 KB
最終ジャッジ日時 2023-08-18 16:02:34
合計ジャッジ時間 6,024 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
56,428 KB
testcase_01 AC 105 ms
55,972 KB
testcase_02 AC 106 ms
53,484 KB
testcase_03 AC 107 ms
55,820 KB
testcase_04 AC 107 ms
56,240 KB
testcase_05 AC 105 ms
56,428 KB
testcase_06 AC 108 ms
55,880 KB
testcase_07 AC 110 ms
56,112 KB
testcase_08 AC 114 ms
55,840 KB
testcase_09 AC 114 ms
55,744 KB
testcase_10 AC 117 ms
55,740 KB
testcase_11 AC 113 ms
55,812 KB
testcase_12 AC 110 ms
55,984 KB
testcase_13 AC 113 ms
56,032 KB
testcase_14 AC 115 ms
55,932 KB
testcase_15 AC 116 ms
56,060 KB
testcase_16 AC 117 ms
55,760 KB
testcase_17 AC 112 ms
55,692 KB
testcase_18 AC 113 ms
55,804 KB
testcase_19 AC 113 ms
56,112 KB
testcase_20 AC 110 ms
53,748 KB
testcase_21 AC 113 ms
56,024 KB
testcase_22 AC 115 ms
55,748 KB
testcase_23 AC 111 ms
54,388 KB
testcase_24 AC 112 ms
55,492 KB
testcase_25 AC 116 ms
55,900 KB
testcase_26 AC 112 ms
55,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Main{
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong(),m=1000007,a,b,c;
		sc.close();
		a=(n+1)/2%m;
		b=(n/2+1)%m;
		c=n/2%m;
		System.out.print((a*b%m+c)%m);
	}
}
0