結果

問題 No.72 そろばん Med
ユーザー holegumaholeguma
提出日時 2015-08-12 03:57:27
言語 Java21
(openjdk 21)
結果
AC  
実行時間 64 ms / 5,000 ms
コード長 440 bytes
コンパイル時間 2,013 ms
コンパイル使用メモリ 74,720 KB
実行使用メモリ 50,464 KB
最終ジャッジ日時 2024-05-01 08:40:40
合計ジャッジ時間 4,729 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
50,064 KB
testcase_01 AC 62 ms
50,144 KB
testcase_02 AC 60 ms
50,464 KB
testcase_03 AC 59 ms
50,052 KB
testcase_04 AC 61 ms
50,104 KB
testcase_05 AC 61 ms
50,364 KB
testcase_06 AC 61 ms
50,072 KB
testcase_07 AC 60 ms
50,124 KB
testcase_08 AC 62 ms
50,292 KB
testcase_09 AC 60 ms
50,352 KB
testcase_10 AC 61 ms
50,340 KB
testcase_11 AC 61 ms
50,364 KB
testcase_12 AC 62 ms
50,304 KB
testcase_13 AC 62 ms
50,308 KB
testcase_14 AC 61 ms
50,216 KB
testcase_15 AC 60 ms
50,416 KB
testcase_16 AC 61 ms
50,400 KB
testcase_17 AC 61 ms
50,072 KB
testcase_18 AC 62 ms
50,072 KB
testcase_19 AC 60 ms
50,232 KB
testcase_20 AC 60 ms
50,360 KB
testcase_21 AC 61 ms
50,276 KB
testcase_22 AC 62 ms
50,212 KB
testcase_23 AC 63 ms
50,316 KB
testcase_24 AC 64 ms
50,324 KB
testcase_25 AC 59 ms
50,100 KB
testcase_26 AC 61 ms
50,396 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