結果

問題 No.746 7の倍数
ユーザー tsuchinagatsuchinaga
提出日時 2019-03-07 12:07:29
言語 Go
(1.22.1)
結果
AC  
実行時間 480 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 10,937 ms
コンパイル使用メモリ 203,280 KB
実行使用メモリ 8,420 KB
最終ジャッジ日時 2023-09-05 19:22:46
合計ジャッジ時間 15,107 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 480 ms
8,392 KB
testcase_04 AC 4 ms
8,056 KB
testcase_05 AC 12 ms
8,420 KB
testcase_06 AC 93 ms
8,392 KB
testcase_07 AC 49 ms
8,396 KB
testcase_08 AC 107 ms
8,392 KB
testcase_09 AC 51 ms
8,396 KB
testcase_10 AC 11 ms
8,412 KB
testcase_11 AC 259 ms
8,392 KB
testcase_12 AC 469 ms
8,396 KB
testcase_13 AC 174 ms
8,392 KB
testcase_14 AC 232 ms
8,392 KB
testcase_15 AC 194 ms
8,392 KB
testcase_16 AC 216 ms
8,392 KB
testcase_17 AC 195 ms
8,392 KB
testcase_18 AC 227 ms
8,392 KB
testcase_19 AC 182 ms
8,392 KB
testcase_20 AC 47 ms
8,396 KB
testcase_21 AC 22 ms
8,388 KB
testcase_22 AC 305 ms
8,396 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package main

import (
	"fmt"
	"strconv"
)

func main() {
	var n int
	_, _ = fmt.Scan(&n)

	if n == 0 {
		fmt.Println(0)
	} else {
		l := []int{1, 4, 2, 8, 5, 7}
		a := "0."
		for i := 0; i < n; i++ {
			a += strconv.Itoa(l[i%len(l)])
		}
		fmt.Println(a)
	}
}
0