結果
| 問題 | 
                            No.1671 Permutation Tour
                             | 
                    
| ユーザー | 
                             shishimaiotoshi
                         | 
                    
| 提出日時 | 2021-09-06 00:49:40 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 301 bytes | 
| コンパイル時間 | 1,651 ms | 
| コンパイル使用メモリ | 166,272 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-12-22 19:03:40 | 
| 合計ジャッジ時間 | 2,341 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | WA * 2 | 
| other | WA * 14 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n, o) for(int i = o;i < (n);i++)
#define ou(x) cout << x << endl
#define ll long long
#define re return 0
signed main(){
    ll n;
    ll t = 1000000007;
    cin >> n;
    ll ans =  (((n % t) * (n % t) + 1) / 3) % t;
    ou(ans);
    re;
}
            
            
            
        
            
shishimaiotoshi