結果

問題 No.71 そろばん
ユーザー scache
提出日時 2014-11-28 13:11:51
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 411 bytes
コンパイル時間 4,771 ms
コンパイル使用メモリ 84,640 KB
実行使用メモリ 54,532 KB
最終ジャッジ日時 2025-01-03 10:10:04
合計ジャッジ時間 8,266 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main72 {
	public static void main(String[] args) {
		Main72 p = new Main72();
	}

	public Main72() {
		Scanner sc = new Scanner(System.in);
		
		long n = sc.nextLong();
		solve(n);
	}

	private final long MOD = 1000007;
	public void solve(long n) {
		long res = ((n/2)%MOD) * ((n-n/2)%MOD+1) + (n-n/2)%MOD;
		System.out.println(res%MOD);
		
	}

}
0