結果

問題 No.72 そろばん Med
コンテスト
ユーザー cureskol
提出日時 2020-03-26 15:20:02
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 5,000 ms
+ 191µs
コード長 223 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 809 ms
コンパイル使用メモリ 181,076 KB
実行使用メモリ 9,920 KB
最終ジャッジ日時 2026-10-10 03:39:36
合計ジャッジ時間 2,139 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge5_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 24
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>
using namespace std;

#define int long long
int f(int a,int b){
  return (((a+1)%1000007)*((b+1)%1000007))%1000007;
}

signed main(){
  int n;cin>>n;
  cout<<(f(n/2,n-n/2)+1000006)%1000007<<endl;
}
0