洛谷 P1089 [NOIP2004 提高组] 津津的储蓄计划
更多...
#include <luogu.h>
|
static int | main (istream &cin, ostream &cout) |
|
洛谷 P1089 [NOIP2004 提高组] 津津的储蓄计划
在文件 luogu.h 第 365 行定义.
◆ main()
int luogu::P1089::main |
( |
istream & | cin, |
|
|
ostream & | cout ) |
|
static |
在文件 luogu.cpp 第 1069 行定义.
1069 {
1070 int budget;
1071 int saving = 0;
1072 int current = 0;
1073 for(int i = 0; i < 12; i++) {
1074 current += 300;
1075 cin >> budget;
1076 if(current < budget) {
1077 cout << -(i + 1);
1078 return 0;
1079 }
1080 current -= budget;
1081 saving += current / 100 * 100;
1082 current %= 100;
1083 }
1084 cout << current + saving / 5 * 6;
1085 return 0;
1086 }
被这些函数引用 luogu::TEST() , 以及 luogu::TEST().
该类的文档由以下文件生成: