Codeforces Buttons
来源:互联网 发布:mac txt转码 编辑:程序博客网 时间:2024/05/18 13:44
题目分析:数学问题,依次计算
import java.util.Scanner;public class Buttons {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);while(scanner.hasNext()) {int n = scanner.nextInt();int sum = 0;int count = 0;for(int i = n; i >= 1; i--) {sum += (i -1) * (count + 1) + 1;count++;}System.out.println(sum);}}}
阅读全文
0 0
- Codeforces Buttons
- codeforces Buttons 数学公式构建
- Codeforces 268B Buttons
- CODEFORCES:B. Two Buttons
- Codeforces-268B-Buttons
- Codeforces-268b E Buttons
- CodeForces 520B【Two Buttons】
- Codeforces 520B. Two Buttons
- Codeforces #164 B. Buttons (数学
- Codeforces 520B.Two Buttons
- B. Two Buttons(Codeforces Round #295(div2))
- Codeforces Round #295 B. Two Buttons
- Codeforces 520B. Two Buttons spfa
- Codeforces 520 B Two Buttons BFS
- Codeforces 520B Two Buttons 【BFS】||【spfa】
- Codeforces 295 Div2 B.Two Buttons
- codeforces 520B Two Buttons BFS
- Codeforces 520B Two Buttons 题解
- Java Web框架的不同
- PLSQL常用配置之窗口/版面保存、SQL格式化/美化、SQL注释\去掉注释等快捷键配置、登陆历史修改配置
- DDPCR
- LeetCode--Bit Manipulation
- 最常用的15大Eclipse开发快捷键技巧
- Codeforces Buttons
- DLL输入和输出函数—dllinport与dllexport
- java中冒泡排序,根据对象的属性,排对象
- solr查询
- java 批量上传文件
- labview与机器视觉,labview调用opencv函数DLL
- 什么是垂直搜索引擎
- scala中的map
- Socket编程