結果

問題 No.71 そろばん
ユーザー te-sh
提出日時 2016-08-29 14:47:05
言語 D
(dmd 2.109.1)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 250 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 103,552 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-06-12 03:48:15
合計ジャッジ時間 1,356 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.algorithm, std.array, std.container, std.range;
import std.string, std.conv, std.math, std.random;
import std.stdio, std.typecons;

void main()
{
  auto n = readln.chomp.to!long;

  auto k = n / 2;

  writeln((k + 1) * (n - k + 1) - 1);
}
0