题目传送门

 /*
数学:假设取了第i个,有C(n-1)(i-1)种取法
则ans = sum (C(n-1)(i-1)) (1<i<=n) 即2^(n-1)
*/
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
using namespace std; typedef long long ll;
const int MAXN = 1e4 + ;
const int INF = 0x3f3f3f3f;
const int MOD = ; int main(void) //FZU 2074 Number of methods
int n;
while (scanf ("%d", &n) == )
{
ll sum = ;
for (int i=; i<n; ++i)
{
sum = sum * % MOD;
}
printf ("%I64d\n", sum);
} return ;
}

数学 FZU 2074 Number of methods的更多相关文章

  1. LeetCode之“数学”:Happy Number

    题目链接 题目要求: Write an algorithm to determine if a number is "happy". A happy number is a num ...

  2. FZU——2111Min Number(多次交换得到最小数,水题)

    Problem 2111 Min Number Accept: 760    Submit: 1516 Time Limit: 1000 mSec    Memory Limit : 32768 KB ...

  3. 数学: HDU1005 Number Sequence

    Number Sequence Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) ...

  4. FZU 2297 Number theory【线段树/单点更新/思维】

    Given a integers x = 1, you have to apply Q (Q ≤ 100000) operations: Multiply, Divide. Input First l ...

  5. error LNK2022: metadata operation failed (801311D6) : Differing number of methods in duplicated types

    本文主要是记录一个C++编译错误的解决方案,具体错误请看本文标题. 这个错误主要是由Managed C++的增量编译导致的,这是VS 2008的一个bug,在VS 2010已经修复,我使用的正式201 ...

  6. methods 方法选项

    最简单的使用方法,一个数字,每点击一下按钮加1 html <div id="app"> <span v-text="number">&l ...

  7. How Can You Tell the Difference Between LINQ Methods and Query Builder Methods?

    LINQ's method syntax looks very similar to the query builder methods,except for one big difference:t ...

  8. The Complete Javascript Number Reference 转载自:http://www.hunlock.com/blogs/The_Complete_Javascript_Number_Reference

    The Complete Javascript Number Reference Filed: Mon, Apr 30 2007 under Programming|| Tags: reference ...

  9. Code Project精彩系列(转)

    Code Project精彩系列(转)   Code Project精彩系列(转)   Applications Crafting a C# forms Editor From scratch htt ...

随机推荐

  1. [K/3Cloud] 关于单据转换的问题

    1. 单据转换,是否支持重复下推,支持新增下推和更新下推? 答:支持重复下推,是否允许下推受以下因素: 1).源分录是否是有效状态(源单单头状态会自动影响分录,下同),例如已审核.未关闭.未作废: 2 ...

  2. struct init

    #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h& ...

  3. Core java for impatient 笔记 ch8 流

    流stream 使用了数据视图,让你可以在比集合更高的概念上指定操作使用流,你只需要将操作的调度留给实现,例如,假设你要计算某个属性的平均值,你只需要指定数据源和属性,然后流类库会优化计算,比如使用多 ...

  4. POJ 3041_Asteroids

    题意: N*N网格中有小行星,光束能将一整行或者一整列的行星消灭,问消灭所有行星至少需要多少光束? 分析: 最小顶点覆盖问题,将每个小行星看成边,左右顶点为横纵坐标,可以转化为二分图,利用二分图中最小 ...

  5. js转xml时 将xml中不需要的字符替换掉的方法replace()

    js中 replace(/\//g, '') 什么作用. 正则表达式 replace(/\//g, '') 的作用是把/替换成''. 用法如下: 比如:var aa= "adsdd/sdsd ...

  6. 我的arcgis培训照片6

    来自:http://www.cioiot.com/successview-556-1.html

  7. Linux学习系列之memcached

    memcached简介 一.memcached是什么 memcached是一个开源的.支持高性能.高并发的分布式内存缓存系统 mem+cache+daemon:分布式内存缓存守护进程 memcache ...

  8. golang 查询数据库操作

    SQL.Open only creates the DB object, but dies not open any connections to the database. If you want ...

  9. react 项目实战(二)创建 用户添加 页面 及 fetch请求 json-server db.json -w -p 8000

    1.安装 路由 npm install -S react-router@3.x 2.新增页面 我们现在的应用只有一个Hello React的页面,现在需要添加一个用于添加用户的页面. 首先在/src目 ...

  10. Android GMS无法通过网络定位

    前言          欢迎大家我分享和推荐好用的代码段~~ 声明          欢迎转载.但请保留文章原始出处:          CSDN:http://www.csdn.net        ...