結果
| 問題 |
No.91 赤、緑、青の石
|
| コンテスト | |
| ユーザー |
shialt
|
| 提出日時 | 2014-12-10 22:50:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 237 bytes |
| コンパイル時間 | 483 ms |
| コンパイル使用メモリ | 58,332 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-11 20:33:30 |
| 合計ジャッジ時間 | 1,214 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 3 |
| other | AC * 5 WA * 23 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:8:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%d", &a[0]);
| ~~~~~^~~~~~~~~~~~~
main.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%d", &a[1]);
| ~~~~~^~~~~~~~~~~~~
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%d", &a[2]);
| ~~~~~^~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
int a[3];
scanf("%d", &a[0]);
scanf("%d", &a[1]);
scanf("%d", &a[2]);
sort(a, a + 3);
printf("%d", (a[0] + a[1]) / 2);
return 0;
}
shialt