結果
| 問題 |
No.570 3人兄弟(その1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-10-15 16:48:21 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 22,144 KB |
| 実行使用メモリ | 15,048 KB |
| 最終ジャッジ日時 | 2024-11-17 17:49:07 |
| 合計ジャッジ時間 | 24,519 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 2 |
| other | TLE * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d", &number[i]);
| ~~~~~^~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void) {
int i, j, tmp;
int number[3] ;
for (i=0; i<3; ++i)
scanf("%d", &number[i]);
for (i=0; i<3; ++i) {
for (j=i+1; j<4; ++j) {
if (number[i] < number[j]) {
tmp = number[i];
number[i] = number[j];
number[j] = tmp;
}
}
}
for (i=0; i<3; ++i)
printf("%d\n", number[i]);
}