結果

問題 No.111 あばばばば
ユーザー tsuchinagatsuchinaga
提出日時 2019-02-27 08:45:58
言語 Go
(1.22.1)
結果
MLE  
実行時間 -
コード長 229 bytes
コンパイル時間 13,077 ms
コンパイル使用メモリ 202,960 KB
実行使用メモリ 810,636 KB
最終ジャッジ日時 2023-09-05 09:07:49
合計ジャッジ時間 13,145 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 MLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
	"strings"
)

func main() {
	var l int
	_, _ = fmt.Scan(&l)
	s := "a" + strings.Repeat("ba", (l-1)/2)

	cnt := 0
	for i := 0; i < l-2; i++ {
		t := s[i+1:]
		cnt += len(t) / 2
	}
	fmt.Println(cnt)
}
0