結果
| 問題 |
No.72 そろばん Med
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-02 12:56:24 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 534 bytes |
| コンパイル時間 | 622 ms |
| コンパイル使用メモリ | 80,028 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-21 11:59:17 |
| 合計ジャッジ時間 | 1,518 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
ソースコード
#define _USE_MATH_DEFINES
#include<stdio.h>
#include<string>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include<iomanip>
//#include<bits/stdc++.h>
using namespace std;
int main() {
long long int n, x,y;
cin >> n;
//n %= 1000007;
x = n / 2;
if (n % 2)x++;
y = n - x;
x %= 1000007;
y %= 1000007;
long long int ans;
ans = x*(y + 1) + y;
ans %= 1000007;
cout << ans << endl;
return 0;
}