結果
| 問題 | No.1729 ~サンプルはちゃんと見て!~ 16進数と8進数(1) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-12 06:53:24 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 478 bytes |
| 記録 | |
| コンパイル時間 | 1,522 ms |
| コンパイル使用メモリ | 167,200 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-03-30 16:36:50 |
| 合計ジャッジ時間 | 2,245 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 WA * 9 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<Array_<char16_t>>' [-Wnontrivial-memcall]
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
out.cpp:688:9: note: in instantiation of function template specialization 'newArraysRec_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>>::operator()<long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1853:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>, long>' requested here
1853 | (k_fq) = (newArrays_<type_(Array_<type_(Array_<char16_t>)>)>(((k_fo)->Len())));
| ^
out.cpp:676:14: note: explicitly cast the pointer to silence this warning
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
| (void*)
1 warning generated.
ソースコード
func main()
var a: []char :: cui@input()
do a.reverse()
var v: int :: 0
var nums: []int :: #[8]int
for i(0, ^a - 1)
do v :+ (a[i] $ int - 'A' $ int + 10) * (16 ^ (i % 4))
if(i % 4 = 3 | i = ^a - 1)
while(v <> 0)
do nums[v % 8] :+ 1
do v :/ 8
end while
do v :: 0
end if
end for
var max: int :: nums.max()
var ans: []int :: #[0]int
for i(0, 7)
if(nums[i] = max)
do ans :~ [i]
end if
end for
do cui@print("\{ans.join(" ")}\n")
end func