#純靠北工程師3z2
----------
今天教各位如何用C++寫忍者code(閏年判斷為例)
正常人︰
```
int year = 2020;//year:今年
if(
(
year % 4 == 0
&& year % 100 != 0
) ||
year % 400 == 0
)//分支
cout << "Yes"; //成立
else cout << "No";//不成立
```
忍者︰
```
const char* _[2] = {"No","Yes"};
int __nj_ = 2020;
std::cout << _[!(__nj_&3)&&__nj_%25||!(__nj_&15)];
```
各位想當忍者嗎?
----------
🗳️ [群眾審核] https://kaobei.engineer/cards/review
👉 [GitHub Repo] https://github.com/init-engineer/init.engineer
📢 [匿名發文] https://kaobei.engineer/cards/create
🥙 [全平台留言] https://kaobei.engineer/cards/show/5150
std::cout 在 Warnings by R CMD check about std::cout #52 - GitHub 的推薦與評價
Some headers in cppad do call std::cout, for example thread_alloc.hpp . This is not allowed by CRAN. It seems all calls to std::cout need to be substituted ... ... <看更多>
std::cout 在 C++ cout 自定義類別 的推薦與評價
本篇ShengYu 介紹如何在C++ 中cout 自定義類別, 某天我寫了一個自定義 ... g++ cpp-cout-myclass.cpp -o a.out -std=c++11 ... std::sort 用法與範例 ... <看更多>