3の倍数の各桁の総和は、3の倍数である。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <sstream> | |
#include <type_traits> | |
#include <typeinfo> | |
#if __has_include(<cxxabi.h>) | |
#include <cxxabi.h> | |
inline std::string _impl_type_demangle_raw(const char* mangled) | |
{ | |
int status; | |
char* buf = abi::__cxa_demangle(mangled, 0, 0, &status); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <tuple> | |
#include <boost/preprocessor/cat.hpp> | |
#define literal_cast(T, CHARS) \ | |
std::get<const T*>( \ | |
std::tuple< \ | |
const char*, \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <type_traits> | |
#include <cassert> | |
// 継承関係で制限 | |
template <class T, class U> | |
concept Derived = std::is_base_of<U, T>::value; | |
template <typename IStream, typename OStream> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <vector> | |
// after C++20 | |
#if __cplusplus >= 202002L | |
#include <ranges> | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fastprogress import master_bar, progress_bar | |
from chainer import reporter | |
from math import ceil | |
import six | |
import PIL | |
from io import BytesIO | |
from IPython import display |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
err := test1() | |
fmt.Println("test1:", err) // "test1: error message" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
"image/jpeg" | |
"io" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang | |
RUN apt-get update && apt-get install -y \ | |
neovim \ | |
python3 \ | |
python3-pip \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& pip3 install --upgrade neovim \ | |
&& mkdir -p /root/.config/nvim \ | |
&& go get -u github.com/nsf/gocode \ |
NewerOlder