結果
問題 | No.71 そろばん |
ユーザー |
![]() |
提出日時 | 2014-12-11 16:00:29 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 123 ms / 5,000 ms |
コード長 | 416 bytes |
コンパイル時間 | 2,060 ms |
コンパイル使用メモリ | 74,576 KB |
実行使用メモリ | 54,560 KB |
最終ジャッジ日時 | 2024-06-11 20:35:17 |
合計ジャッジ時間 | 5,016 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
package no072; import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); BigInteger n = new BigInteger(sc.next()); BigInteger half = n.divide(new BigInteger("2")); System.out.println( half.add(BigInteger.ONE).multiply(n.subtract(half).add(BigInteger.ONE)).subtract(BigInteger.ONE)); } }