結果
問題 | No.906 Y字グラフ |
ユーザー |
![]() |
提出日時 | 2018-08-15 23:37:45 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 207 bytes |
コンパイル時間 | 1,829 ms |
コンパイル使用メモリ | 191,736 KB |
最終ジャッジ日時 | 2025-01-06 12:20:17 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 28 |
コンパイルメッセージ
main.cpp:6:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type] 6 | main(){cin.tie(0);ios::sync_with_stdio(false); | ^~~~
ソースコード
#include<bits/stdc++.h>using namespace std;const int MD=1e9+7;main(){cin.tie(0);ios::sync_with_stdio(false);long long N,k;cin>>N;N-=4;k=N%6;N/=6;N%=MD;cout<<((3*N+k)*(N+1)+!k)%MD<<endl;}