結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー | sekiya9311 |
提出日時 | 2017-06-03 11:45:44 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,906 bytes |
コンパイル時間 | 915 ms |
コンパイル使用メモリ | 110,212 KB |
実行使用メモリ | 28,276 KB |
最終ジャッジ日時 | 2023-10-22 02:52:12 |
合計ジャッジ時間 | 7,686 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 82 ms
24,180 KB |
testcase_01 | AC | 291 ms
26,228 KB |
testcase_02 | AC | 240 ms
24,180 KB |
testcase_03 | AC | 606 ms
28,276 KB |
testcase_04 | AC | 22 ms
24,176 KB |
testcase_05 | AC | 23 ms
24,176 KB |
testcase_06 | AC | 23 ms
24,176 KB |
testcase_07 | AC | 26 ms
24,180 KB |
testcase_08 | AC | 42 ms
24,180 KB |
testcase_09 | AC | 403 ms
26,228 KB |
testcase_10 | TLE | - |
コンパイルメッセージ
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; namespace Competitive_Programming { class MainClass { Scanner sc; static void Main(string[] args) { new MainClass().solve(); } void solve() { sc = new Scanner(); int N = sc.NextInt(); for (int a = 1; a <= N; a++) { for (int b = a; b <= N; b++) { int c = N - a - b; if (a <= b && b <= c) { Console.Write(a); Console.Write(' '); Console.Write(b); Console.Write(' '); Console.Write(c); Console.Write('\n'); } } } } } class Scanner { Queue<string> buf; public Scanner() { buf = new Queue<string>(); this.GetBuf(); } private void GetBuf() { if (buf.Count == 0) { string[] stringArray = Console.ReadLine().Split(' '); foreach (string e in stringArray) { buf.Enqueue(e); } } } public int NextInt() { this.GetBuf(); return int.Parse(buf.Dequeue()); } public long NextLong() { this.GetBuf(); return long.Parse(buf.Dequeue()); } public double NextDouble() { this.GetBuf(); return double.Parse(buf.Dequeue()); } public string Next() { this.GetBuf(); return buf.Dequeue(); } } }