結果
| 問題 |
No.83 最大マッチング
|
| コンテスト | |
| ユーザー |
t_murano
|
| 提出日時 | 2016-06-11 17:24:19 |
| 言語 | Go (1.23.4) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 5,000 ms |
| コード長 | 439 bytes |
| コンパイル時間 | 12,336 ms |
| コンパイル使用メモリ | 220,676 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 05:14:22 |
| 合計ジャッジ時間 | 12,245 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 |
ソースコード
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func nextInt(sc *bufio.Scanner) int {
sc.Scan()
i, e := strconv.Atoi(sc.Text())
if e != nil {
panic(e)
}
return i
}
func printN(v, n int) {
for i := 0; i < n; i++ {
fmt.Print(v)
}
}
func main() {
sc := bufio.NewScanner(os.Stdin)
n := nextInt(sc)
count1 := n / 2
if n%2 == 1 {
fmt.Print(7)
printN(1, count1-1)
} else {
printN(1, count1)
}
fmt.Println()
}
t_murano