Submission #00110


ソースコード

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
using namespace std;
int main(){
int s, t, d;
int x = 0;
int chang;
cin >> s >> t >> d;
if(t < 0){
chang = t;
t = s;
s = chang;
while(s < t){
s = s + d;
x++;
if(s > t){
break;
}
}
if(s > t){
x = -1;
}
cout << x << "\n";
}
return(0);
}

ステータス

項目 データ
問題 0009 - ぴょん
ユーザー名 ei2207
投稿日時 2022-07-19 17:28:43
言語 C++
状態 Wrong Answer
得点 0
ソースコード長 458 Byte
最大実行時間 32 ms
最大メモリ使用量 604 KB

セット

セット 得点 Cases
1 ALL 0 / 1 *

テストケース

ファイル名 状態 実行時間 メモリ使用量 #
01_sample1.txt WA 26 ms 604 KB
1
01_sample2.txt AC 18 ms 448 KB
1
01_sample3.txt WA 18 ms 424 KB
1
02_handmake1.txt WA 26 ms 396 KB
1
02_handmake2.txt AC 23 ms 376 KB
1
02_handmake3.txt WA 24 ms 348 KB
1
02_handmake4.txt AC 20 ms 448 KB
1
02_handmake5.txt AC 32 ms 548 KB
1
02_handmake6.txt WA 22 ms 520 KB
1