群赛11.10 A Very Easy Triangle Counting Game
来源:互联网 发布:阿里云的机房 编辑:程序博客网 时间:2024/04/30 21:50
Problem G: A Very Easy Triangle Counting Game
Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 80 Solved: 31
[Submit][Status][Web Board]
Description
Input
Output
Sample Input
3
1
4
6
Sample Output
Case #1: 0
Case #2: 8
Case #3: 32
HINT
#include <cstdio>#include <cstring>#include <queue>#include <stack>#include <algorithm>#include <iostream>using namespace std;int solve(int n){ if(n<3) return 0; if(n==3) return 1; if(n==4) return 8; if(n==5) return 35; if(n==6) return 32; int ans=0; ans = 5*n; return ans%20121111;}int main(){ freopen("in.txt","r",stdin); int cas,T=1; scanf("%d",&cas); while(cas--) { int n; scanf("%d",&n); printf("Case #%d: %d\n",T++,solve(n)); } return 0;}
- 群赛11.10 A Very Easy Triangle Counting Game
- ACdream1008:A Very Easy Triangle Counting Game
- acdream1008 A Very Easy Triangle Counting Game
- ACdream 1008 A Very Easy Triangle Counting Game 数三角形
- ACdream 1008 A Very Easy Triangle Counting Game(找规律)
- SWJTUOJ-2397 A Easy Counting Problem
- Triangle Counting
- ZOJ Very Simple Counting
- A Easy Game(FZU 2146)
- Uva 10523 Very Easy!!!
- UVa 10523 - Very Easy !!!
- [字符串]Very easy
- uva 10523 Very Easy !!!
- Another Very Easy Task
- ZOJ 3286 Very Simple Counting
- ZOJ:3286 Very Simple Counting
- Easy Game
- Easy Game
- Objective-C内存管理教程和原理剖析(二)口诀与范式
- 利用ffmpeg解码h264流的代码
- Objective-C内存管理教程和原理剖析(三)@property (retain)和@synthesize的默认实现
- 工作中应该持有的态度
- android ethernet
- 群赛11.10 A Very Easy Triangle Counting Game
- cocos2d-x内存管理机制
- html中输入空格的简单方法
- 【Poco】Poco::BypeOrder的例子
- struts1 配置
- java常量池
- Objective-C内存管理教程和原理剖析(四)系统自动创建新的autorelease pool
- 4.2.3 串的块链存储表示
- 数字游戏