結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー Takeno_hito
提出日時 2017-06-10 10:55:25
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 298 bytes
コンパイル時間 659 ms
コンパイル使用メモリ 56,720 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 15:28:32
合計ジャッジ時間 4,155 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <string>
#include <stdio.h>

using namespace std;

int main(){
  int N;
  cin >> N;
  int c=0;
  for(int a=1;a<=N;a++){
    for(int b=a;a+b<=N;b++){
      c=N-(a+b);
      if(c>0 && b<=c)
        printf("%d %d %d\n",a,b,c);
    }
  }
  return 0;
}
0