結果
| 問題 | No.164 ちっちゃくないよ!! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-31 02:30:38 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 574 bytes |
| コンパイル時間 | 776 ms |
| コンパイル使用メモリ | 121,312 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-12 03:57:33 |
| 合計ジャッジ時間 | 1,338 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
import std.algorithm, std.array, std.container, std.range;
import std.numeric, std.math, std.bigint, std.bitmanip, std.random;
import std.string, std.conv, std.stdio, std.typecons;
void main()
{
auto n = readln.chomp.to!int;
auto vi = iota(n)
.map!(_ => readln.chomp)
.map!(s => s.map!(c => c >= '0' && c <= '9' ? c - '0' : c - 'A' + 10).map!(to!long).array);
auto r = vi.map!(v => toLong(v, v.reduce!(max) + 1)).reduce!(min);
writeln(r);
}
long toLong(long[] v, long radix)
{
return iota(v.length).map!(i => v[i] * radix ^^ (v.length - i - 1)).sum;
}