結果
| 問題 | No.522 Make Test Cases(テストケースを作る) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-02 17:37:01 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 71 ms / 2,000 ms |
| + 281µs | |
| コード長 | 230 bytes |
| 記録 | |
| コンパイル時間 | 44 ms |
| コンパイル使用メモリ | 29,056 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-07-24 15:30:47 |
| 合計ジャッジ時間 | 2,040 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}