結果

問題 No.72 そろばん Med
ユーザー リチウムリチウム
提出日時 2014-11-19 00:50:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 277 bytes
コンパイル時間 2,054 ms
コンパイル使用メモリ 74,648 KB
実行使用メモリ 54,552 KB
最終ジャッジ日時 2024-05-01 08:28:32
合計ジャッジ時間 5,723 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
54,552 KB
testcase_01 AC 117 ms
54,180 KB
testcase_02 AC 113 ms
54,020 KB
testcase_03 AC 118 ms
53,956 KB
testcase_04 AC 117 ms
54,288 KB
testcase_05 AC 103 ms
52,772 KB
testcase_06 AC 111 ms
54,068 KB
testcase_07 AC 110 ms
53,424 KB
testcase_08 AC 119 ms
54,060 KB
testcase_09 AC 121 ms
53,780 KB
testcase_10 AC 119 ms
53,728 KB
testcase_11 AC 117 ms
54,108 KB
testcase_12 AC 117 ms
53,992 KB
testcase_13 AC 112 ms
53,816 KB
testcase_14 AC 111 ms
53,840 KB
testcase_15 AC 115 ms
54,208 KB
testcase_16 AC 101 ms
52,928 KB
testcase_17 AC 107 ms
53,488 KB
testcase_18 AC 115 ms
53,956 KB
testcase_19 AC 111 ms
53,940 KB
testcase_20 AC 113 ms
54,040 KB
testcase_21 AC 104 ms
52,704 KB
testcase_22 AC 105 ms
52,672 KB
testcase_23 AC 112 ms
52,864 KB
testcase_24 AC 118 ms
54,028 KB
testcase_25 AC 115 ms
54,292 KB
testcase_26 AC 117 ms
54,084 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