結果
問題 | No.522 Make Test Cases(テストケースを作る) |
ユーザー |
|
提出日時 | 2016-11-02 17:37:01 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 143 ms / 2,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-22 01:00:26 |
合計ジャッジ時間 | 2,551 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:5:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%d",&n); | ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>int main(void) {int a,b,c,n;scanf("%d",&n);for(a = 1;a <= n;a++){for(b = a;b <= n;b++){if(a+b >= n){break;}c = n - a - b;if(b > c){break;}printf("%d %d %d\n",a,b,c);}}return 0;}