結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー | mban |
提出日時 | 2017-06-03 14:23:05 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 403 ms / 2,000 ms |
コード長 | 754 bytes |
コンパイル時間 | 1,439 ms |
コンパイル使用メモリ | 107,188 KB |
実行使用メモリ | 66,268 KB |
最終ジャッジ日時 | 2023-10-22 02:58:06 |
合計ジャッジ時間 | 3,512 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 23 ms
23,848 KB |
testcase_01 | AC | 32 ms
25,988 KB |
testcase_02 | AC | 29 ms
25,896 KB |
testcase_03 | AC | 47 ms
29,428 KB |
testcase_04 | AC | 21 ms
23,888 KB |
testcase_05 | AC | 21 ms
23,848 KB |
testcase_06 | AC | 20 ms
23,848 KB |
testcase_07 | AC | 20 ms
23,848 KB |
testcase_08 | AC | 21 ms
23,848 KB |
testcase_09 | AC | 37 ms
28,680 KB |
testcase_10 | AC | 403 ms
66,268 KB |
コンパイルメッセージ
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()); } }