洛谷 P2669 [NOIP2015 普及组] 金币
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P2669 [NOIP2015 普及组] 金币
在文件 luogu.h 第 279 行定义.
◆ main()
int luogu::P2669::main |
( |
istream & | cin, |
|
|
ostream & | cout ) |
|
static |
在文件 luogu.cpp 第 746 行定义.
746 {
747 unsigned int k;
748 unsigned int coin = 0;
749 unsigned current = 1;
750 unsigned rest = 1;
751 cin >> k;
752 for(unsigned int i = 0; i < k; i++) {
753 if(rest == 0) {
754 current++;
755 rest = current;
756 }
757 coin += current;
758 rest--;
759 }
760 cout << coin;
761 return 0;
762 }
被这些函数引用 luogu::TEST() , 以及 luogu::TEST().
该类的文档由以下文件生成: