結果
| 問題 | No.3163 [Cherry 7th Tune N] Draft |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-17 17:34:15 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 316 bytes |
| コンパイル時間 | 1,457 ms |
| コンパイル使用メモリ | 26,672 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-17 17:34:17 |
| 合計ジャッジ時間 | 1,730 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%d",&T);
| ^~~~~~~~~~~~~~
main.c:9:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
9 | scanf("%lld",&A[i]);
| ^~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
int main(void){
int T;
scanf("%d",&T);
for(int j=0; j<T; j++){
long long A[5];
for(int i=0; i<5; i++){
scanf("%lld",&A[i]);
}
long long X,Y;
X=A[0];
Y=A[0];
for(int i=0; i<5; i++){
if(X<A[i]){
X=A[i];
}
if(Y>A[i]){
Y=A[i];
}
}
printf("%lld\n",X-Y);
}
}