結果

問題 No.72 そろばん Med
ユーザー kano_townkano_town
提出日時 2014-11-20 10:57:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 5,000 ms
コード長 331 bytes
コンパイル時間 3,489 ms
コンパイル使用メモリ 74,204 KB
実行使用メモリ 41,676 KB
最終ジャッジ日時 2024-05-01 08:32:06
合計ジャッジ時間 6,939 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 104 ms
41,236 KB
testcase_01 AC 116 ms
41,352 KB
testcase_02 AC 111 ms
41,448 KB
testcase_03 AC 110 ms
41,316 KB
testcase_04 AC 108 ms
41,484 KB
testcase_05 AC 108 ms
41,540 KB
testcase_06 AC 121 ms
41,620 KB
testcase_07 AC 111 ms
41,676 KB
testcase_08 AC 113 ms
39,872 KB
testcase_09 AC 99 ms
41,364 KB
testcase_10 AC 105 ms
41,276 KB
testcase_11 AC 114 ms
39,876 KB
testcase_12 AC 112 ms
41,304 KB
testcase_13 AC 117 ms
41,580 KB
testcase_14 AC 118 ms
40,296 KB
testcase_15 AC 105 ms
41,128 KB
testcase_16 AC 113 ms
41,128 KB
testcase_17 AC 104 ms
41,476 KB
testcase_18 AC 103 ms
41,188 KB
testcase_19 AC 101 ms
41,416 KB
testcase_20 AC 116 ms
41,140 KB
testcase_21 AC 112 ms
40,296 KB
testcase_22 AC 105 ms
41,584 KB
testcase_23 AC 118 ms
40,396 KB
testcase_24 AC 117 ms
41,092 KB
testcase_25 AC 114 ms
41,220 KB
testcase_26 AC 117 ms
41,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Yukicoder72 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = sc.nextLong();
		long up = (n / 2) % 1000007;
		long down = (n - up) % 1000007;
		
		long res = (down + 1) * up % 1000007 + down;
		System.out.println(res % 1000007);
	}
}
0