結果

問題 No.522 Make Test Cases(テストケースを作る)
ユーザー PachicobuePachicobue
提出日時 2019-03-30 10:37:42
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 200 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 1,928 ms
コンパイル使用メモリ 193,904 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-25 18:05:58
合計ジャッジ時間 4,040 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,816 KB
testcase_01 AC 8 ms
6,940 KB
testcase_02 AC 7 ms
6,948 KB
testcase_03 AC 14 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,944 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 11 ms
6,940 KB
testcase_10 AC 200 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 
#include <bits/stdc++.h>
int main(){
    int N;std::cin>>N;
    for(int a=1;2*a<=N-a;a++){
        for(int b=a;a+b+b<=N;b++){
            int c=N-a-b;
            std::cout<<a<<" "<<b<<" "<<c<<"\n";
        }
    }
}
0