結果
問題 |
No.346 チワワ数え上げ問題
|
ユーザー |
|
提出日時 | 2016-02-27 21:49:08 |
言語 | D (dmd 2.109.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 469 bytes |
コンパイル時間 | 761 ms |
コンパイル使用メモリ | 99,500 KB |
実行使用メモリ | 16,832 KB |
最終ジャッジ日時 | 2024-06-12 03:08:31 |
合計ジャッジ時間 | 7,170 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | TLE * 1 -- * 22 |
ソースコード
import std.algorithm, std.string, std.stdio; void main() { string[] cwws = readln.chomp.split(string.init); string cww = "cww"; size_t count; for (size_t idx; idx < cwws.length - 2; idx++) { for (size_t jdx = idx + 1; jdx < cwws.length - 1; jdx++) { for (size_t kdx = jdx + 1; kdx < cwws.length; kdx++) { if ([idx, jdx, kdx].map!(i => cwws[i]).join == cww) { count++; } } } } writeln(count); }