結果
問題 | No.920 あかあお |
ユーザー |
![]() |
提出日時 | 2021-05-02 12:17:32 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 228 bytes |
コンパイル時間 | 291 ms |
コンパイル使用メモリ | 20,864 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-20 20:53:26 |
合計ジャッジ時間 | 955 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 3 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:7:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf("%d%d%d", &x, &y, &z); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> int main(void) { int x, y, z; scanf("%d%d%d", &x, &y, &z); if(x > y){ printf("%d\n", (z - abs(x - y)) / 2 + x); } else{ printf("%d\n", (z - abs(x - y)) / 2 + y); } return 0; }