結果
| 問題 | No.72 そろばん Med | 
| コンテスト | |
| ユーザー |  めうめう🎒 | 
| 提出日時 | 2016-03-27 21:54:29 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 630 bytes | 
| コンパイル時間 | 608 ms | 
| コンパイル使用メモリ | 82,668 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-02 05:11:30 | 
| 合計ジャッジ時間 | 1,604 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | WA * 24 | 
ソースコード
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <iomanip>
using namespace std;
#define ll long long
#define INF (1 << 30)
#define INFLL (1LL << 60)
int main() {
	ll n,ans = 0;
	cin >> n;
	if(n % 2 == 0){
		ans = ((n / 2 + 1) % 1000007) * ((n / 2) % 10000007);
		ans += (n / 2) % 1000007;
		ans = ans % 1000007;
	}else{
		ans = ((n / 2 + 2) % 1000007) * ((n / 2) % 10000007);
		ans += (n / 2 + 2) % 1000007;
		ans = ans % 1000007 - 1;
	}
	cout << ans << endl;
	return 0;
}
            
            
            
        