結果

問題 No.72 そろばん Med
ユーザー リチウムリチウム
提出日時 2014-11-19 00:52:13
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 277 bytes
コンパイル時間 2,133 ms
コンパイル使用メモリ 73,924 KB
実行使用メモリ 56,072 KB
最終ジャッジ日時 2024-05-01 08:29:18
合計ジャッジ時間 6,449 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
54,108 KB
testcase_01 AC 123 ms
54,100 KB
testcase_02 AC 124 ms
54,068 KB
testcase_03 AC 126 ms
54,340 KB
testcase_04 AC 124 ms
54,200 KB
testcase_05 AC 116 ms
52,808 KB
testcase_06 AC 124 ms
54,080 KB
testcase_07 AC 126 ms
54,024 KB
testcase_08 AC 125 ms
54,248 KB
testcase_09 AC 129 ms
54,296 KB
testcase_10 AC 125 ms
53,916 KB
testcase_11 AC 127 ms
54,260 KB
testcase_12 AC 127 ms
53,872 KB
testcase_13 AC 125 ms
54,212 KB
testcase_14 AC 124 ms
54,132 KB
testcase_15 AC 124 ms
54,104 KB
testcase_16 AC 124 ms
54,176 KB
testcase_17 AC 125 ms
54,020 KB
testcase_18 AC 125 ms
54,000 KB
testcase_19 AC 127 ms
54,104 KB
testcase_20 AC 125 ms
54,052 KB
testcase_21 AC 112 ms
52,732 KB
testcase_22 AC 128 ms
56,072 KB
testcase_23 AC 129 ms
54,100 KB
testcase_24 AC 128 ms
54,292 KB
testcase_25 AC 126 ms
54,160 KB
testcase_26 AC 114 ms
52,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		long n=sc.nextLong();
		long x=n/2;
		long mod=1000007;
		long ans=((x%mod)*((n-x)%mod)%mod+n%mod)%mod;
			
	    System.out.println(ans);
	}}
0