結果

問題 No.71 そろばん
ユーザー scache
提出日時 2014-11-28 13:13:15
言語 Java
(openjdk 23)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 3,886 ms
コンパイル使用メモリ 75,940 KB
実行使用メモリ 54,404 KB
最終ジャッジ日時 2025-01-03 10:10:38
合計ジャッジ時間 7,269 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 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);
	}

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

}
0