結果
| 問題 | No.185 和風 |
| コンテスト | |
| ユーザー |
Maeda
|
| 提出日時 | 2025-03-18 16:42:09 |
| 言語 | C (gcc 15.2.0) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 412 bytes |
| 記録 | |
| コンパイル時間 | 111 ms |
| コンパイル使用メモリ | 39,236 KB |
| 最終ジャッジ日時 | 2026-02-22 13:18:41 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | RE * 7 |
ソースコード
#include <stdio.h>
#include <string.h>
void main(void) {
int n = 0;
scanf("%d",&n);
int numA,numB;
int resultList[n];
for(int i = 0 ; i < n ; i++ ){
scanf("%d %d",&numA,&numB);
resultList[i] = numB - numA;
}
int x = resultList[0];
if(x > 0){
for(int i = 1 ; i < n ; i++ ){
if(resultList[i] <= 0 || resultList[i] != x){
x = -1;
break;
}
}
}else{
x = -1;
}
printf("%d",x);
}
Maeda