作者fatalfeel2 (风在动)
看板PublicServan
标题Re: [请益] 公教优惠储蓄的问题
时间Mon Oct 23 22:43:25 2023
(本文公式有更正在底部)
公教 定期储蓄存款 半年给息 利率1.595%
附件为细算公式 至少问了六位行员
如果不说 你一定不知道Trick在那里
那一家的我不想说了
最後得知 它是单利 同时 以int(integer整数去除小数点) 来算
你可以心算出第一年前两个月是 0
无言...........................
公教人员 你们辛苦了
台北富邦数位客服:
定存利息的计算方法,采按日计息
一、算式:本金X年利率/365天*存款天数,
故每月给息者,金额可能因月份天数不同有些微差异
注意它是 [按日计息]
由於没有注明是四舍五入 所以我一概去除小数点
10000*1.595%/365*1 = 0.43698630137 第1天 利息是 0
10000*1.595%/365*1 = 0.43698630137 第2天 利息是 0
第一个月 利息 0
////////////////////////////细算公式///////////////
Result0: 858 第一年利
Result1: 2801 第二年利
Result2: 4760 第三年利
将code start 到 code end 放入此站 然後点网站中第一列的Run看结果
https://www.onlinegdb.com/online_c++_compiler
如图
https://www.mediafire.com/view/yvgqp550i4017zx/bank_interest.png/file
//code start
#include <iostream>
#include <stdio.h>
int main()
{
double half_interest0;
double half_interest1;
double accumulation = 0.0;
accumulation += ((int)(10000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(20000 * 1.595 / 100 / 365)) * 28;
accumulation += ((int)(30000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(40000 * 1.595 / 100 / 365)) * 30;
accumulation += ((int)(50000 * 1.595 / 100 / 365)) * 31;
accumulation += ((int)(60000 * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((60000 + half_interest0) * 1.595 / 100 / 365)) * 10;
//6/21 pay interest
accumulation += ((int)((70000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((80000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((90000 + half_interest0) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((100000 + half_interest0) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((110000 + half_interest0) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((120000 + half_interest0) * 1.595 / 100 / 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + half_interest0 + half_interest1) * 1.595 /
100 / 365)) * 11; //12/21 pay interest
std::cout << "Result0: " << half_interest0 + half_interest1 + accumulation <<
std::endl;
accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 10000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 20000) * 1.595 / 100 / 365)) * 28;
accumulation += ((int)((120000 + 858 + 30000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 40000) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((120000 + 858 + 50000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((120000 + 858 + 60000) * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 60000 + half_interest0) * 1.595 / 100
/ 365)) * 10; //6/21 pay interest
accumulation += ((int)((120000 + 858 + 70000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 80000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 90000 + half_interest0) * 1.595 / 100
/ 365)) * 30;
accumulation += ((int)((120000 + 858 + 100000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((120000 + 858 + 110000 + half_interest0) * 1.595 / 100
/ 365)) * 30;
accumulation += ((int)((120000 + 858 + 120000 + half_interest0) * 1.595 / 100
/ 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((120000 + 858 + 120000 + half_interest0 +
half_interest1) * 1.595 / 100 / 365)) * 11; //12/21 pay interes
std::cout << "Result1: " << half_interest0 + half_interest1 + accumulation <<
std::endl;
accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 10000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 20000) * 1.595 / 100 / 365)) * 28;
accumulation += ((int)((240000 + 2801 + 30000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 40000) * 1.595 / 100 / 365)) * 30;
accumulation += ((int)((240000 + 2801 + 50000) * 1.595 / 100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 60000) * 1.595 / 100 / 365)) * 20;
half_interest0 = accumulation;
accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 60000 + half_interest0) * 1.595 / 100
/ 365)) * 10; //6/21 pay interest
accumulation += ((int)((240000 + 2801 + 70000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((240000 + 2801 + 80000 + half_interest0) * 1.595 / 100
/ 365)) * 31;
accumulation += ((int)((240000 + 2801 + 90000 + half_interest0) * 1.595 / 100
/ 365)) * 30;
accumulation += ((int)((240000 + 2801 + 100000 + half_interest0) * 1.595 /
100 / 365)) * 31;
accumulation += ((int)((240000 + 2801 + 110000 + half_interest0) * 1.595 /
100 / 365)) * 30;
accumulation += ((int)((240000 + 2801 + 120000 + half_interest0) * 1.595 /
100 / 365)) * 20;
half_interest1 = accumulation;
accumulation = 0.0;
accumulation += ((int)((240000 + 2801 + 120000 + half_interest0 +
half_interest1) * 1.595 / 100 / 365)) * 11; //12/21 pay interest
std::cout << "Result2: " << half_interest0 + half_interest1 + accumulation <<
std::endl << std::endl;
return 0;
}
//code end
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 218.187.86.86 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/PublicServan/M.1698072207.A.818.html
1F:推 aleventy: 超级优惠,给赞 10/23 22:58
2F:推 maiico: 央行14%屌打 10/24 07:18
3F:推 y932987: 搞不好是贪污 国外也有贪一元的案件 然後加总数字可观 10/24 07:42
https://tinyurl.com/bd98wnwp
您说的叫 萨拉米 技术
Thomas Whiteside 在 1978 年出版的《Computer Capers》一书中报告了 40 多年前这种
技术的真实例子 银行做就叫合法 你做就是违法
4F:→ iverson414: 笑烂了 10/24 08:04
5F:→ longlydreami: 其他投资比这个划算 这个太保守 10/24 09:18
6F:推 RX78NT1: 我也有去柜台问,他回答反正公家不会算错你就领就对了 10/24 12:21
※ 编辑: fatalfeel2 (114.32.93.159 台湾), 10/25/2023 11:00:58
公式有修正请看这
https://webptt.com/cn.aspx?n=bbs/PublicServan/M.1698134548.A.0E3.html
※ 编辑: fatalfeel2 (114.32.93.159 台湾), 10/25/2023 16:15:28
7F:推 roy147yo: C++好难啊 10/25 18:35