結果
| 問題 | No.522 Make Test Cases(テストケースを作る) |
| コンテスト | |
| ユーザー |
mban
|
| 提出日時 | 2017-06-03 14:23:05 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 459 ms / 2,000 ms |
| コード長 | 754 bytes |
| コンパイル時間 | 862 ms |
| コンパイル使用メモリ | 112,444 KB |
| 実行使用メモリ | 66,252 KB |
| 最終ジャッジ日時 | 2024-09-22 04:30:10 |
| 合計ジャッジ時間 | 3,334 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
class Program
{
static void Main(string[] args)
{
new Magatro().Solve();
}
}
class Magatro
{
private int N;
public void Solve()
{
N = int.Parse(Console.ReadLine());
var sb = new StringBuilder();
for (int a = 1; a <= N / 3; a++)
{
for (int b = a; b <= (N - a) / 2; b++)
{
int c = N - a - b;
if (c <= 0 || b > c)
{
continue;
}
sb.Append(string.Format("{0} {1} {2}\n", a, b, c));
}
}
Console.Write(sb.ToString());
}
}
mban