Your code here...
include
using namespace std; int main() { long long n,u=1,d=2,c=1000000007; cin>>n; while(n) { if(n%2) u=(u*d)%c; d=(d*d)%c; n/=2; } cout<<((u*u+u)/2)%c; return 0; }
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3792 |
| 2 | VivaciousAubergine | 3647 |
| 3 | Kevin114514 | 3603 |
| 4 | jiangly | 3583 |
| 5 | strapple | 3515 |
| 6 | tourist | 3470 |
| 7 | dXqwq | 3436 |
| 8 | Radewoosh | 3415 |
| 9 | Otomachi_Una | 3413 |
| 10 | Um_nik | 3376 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 158 |
| 2 | adamant | 152 |
| 3 | Um_nik | 146 |
| 4 | Dominater069 | 144 |
| 5 | errorgorn | 141 |
| 6 | cry | 139 |
| 6 | Proof_by_QED | 139 |
| 8 | YuukiS | 135 |
| 9 | chromate00 | 134 |
| 9 | TheScrasse | 134 |
Your code here...
using namespace std; int main() { long long n,u=1,d=2,c=1000000007; cin>>n; while(n) { if(n%2) u=(u*d)%c; d=(d*d)%c; n/=2; } cout<<((u*u+u)/2)%c; return 0; }
| Name |
|---|



w.t.f?
W.T.F??? W->What T->The F->Food)))
facespalm :(
What???What is facespalm???
What you really need is a formatting here.
It looks like some quick power function.
Guess you can read Chinese, refer here. http://blog.csdn.net/on_1y/article/details/7989603