結果
問題 | No.72 そろばん Med |
ユーザー |
|
提出日時 | 2024-11-01 10:32:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 404 bytes |
コンパイル時間 | 2,063 ms |
コンパイル使用メモリ | 192,464 KB |
最終ジャッジ日時 | 2025-02-25 01:59:09 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, e) for (int i = (int)s; i < (int)e; ++i) #define all(a) (a).begin(), (a).end() const ll mod = 1e6 + 7; int main() { cin.tie(nullptr); ll N; cin >> N; ll mid = N / 2; ll t1 = mid % mod; ll t2 = (N - mid) % mod; N %= mod; cout << (t1 * t2 % mod + N) % mod << '\n'; }