結果
| 問題 |
No.72 そろばん Med
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-24 12:38:30 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 261 bytes |
| コンパイル時間 | 885 ms |
| コンパイル使用メモリ | 98,020 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 06:33:46 |
| 合計ジャッジ時間 | 1,724 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 23 WA * 1 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;
const long mod = 10 ^^ 6 + 7;
void main()
{
auto n = readln.chomp.to!long;
auto m1 = n / 2 + 1;
auto m2 = n - n / 2 + 1;
auto r = ((m1 % mod) * (m2 % mod) - 1) % mod;
writeln(r);
}