Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

問題 85 に別解を 2 つ追加しました #34

Merged
merged 1 commit into from
Nov 9, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions answer/85.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ $ echo 🍑 🍓 | xargs -n1 | perl -nlE 'say unpack("H*",$_)' | xargs | awk '{p
別解1(上田)$ echo 🍑 🍓 | xxd -i | mawk -F, '{for(i=1;i<=4;i++){printf("%x", ($i + $(i+5))/2)}}' | xxd -p -r
別解2(田代)$ echo 🍑 🍓 | xxd -u -p -l 4 | sed 's/^/obase=16;ibase=16;/;s/$/+1/' | bc | xxd -p -r
```

### 読者別解

by [kariya-mitsuru](https://github.com/kariya-mitsuru)

```
$ echo 🍑 🍓 | perl -MList::Util=sum -nE 's/ //; say pack "L>", sum(unpack "L>*") / 2'
$ echo 🍑 🍓 | ruby -E :UTF-8 -ane 'puts $F.map(&:ord).sum./(2).chr'
```