結果

問題 No.72 そろばん Med
ユーザー holegumaholeguma
提出日時 2015-08-12 03:57:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 2,712 ms
コンパイル使用メモリ 71,388 KB
実行使用メモリ 49,804 KB
最終ジャッジ日時 2023-08-13 15:53:07
合計ジャッジ時間 4,293 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,492 KB
testcase_01 AC 43 ms
49,216 KB
testcase_02 AC 43 ms
49,532 KB
testcase_03 AC 44 ms
47,340 KB
testcase_04 AC 42 ms
49,404 KB
testcase_05 AC 42 ms
49,264 KB
testcase_06 AC 41 ms
49,444 KB
testcase_07 AC 42 ms
49,252 KB
testcase_08 AC 42 ms
49,536 KB
testcase_09 AC 42 ms
49,508 KB
testcase_10 AC 42 ms
49,720 KB
testcase_11 AC 42 ms
49,412 KB
testcase_12 AC 42 ms
49,504 KB
testcase_13 AC 42 ms
49,304 KB
testcase_14 AC 43 ms
49,456 KB
testcase_15 AC 42 ms
49,360 KB
testcase_16 AC 42 ms
49,348 KB
testcase_17 AC 42 ms
49,804 KB
testcase_18 AC 42 ms
49,584 KB
testcase_19 AC 43 ms
49,264 KB
testcase_20 AC 42 ms
49,684 KB
testcase_21 AC 42 ms
49,788 KB
testcase_22 AC 42 ms
49,528 KB
testcase_23 AC 41 ms
47,452 KB
testcase_24 AC 42 ms
49,676 KB
testcase_25 AC 42 ms
49,376 KB
testcase_26 AC 42 ms
49,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

class Main{

static final PrintWriter out=new PrintWriter(System.out);
static long MOD=1000007;

public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
long n=Long.parseLong(line);
long k=(long)n/2;
long ans=(((n-k)%MOD)*(k%MOD)+n%MOD)%MOD;
out.println(ans);
out.flush();
}
}
}
0