結果
| 問題 | No.2194 兄弟の掛け引き |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-28 03:30:40 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 38,624 KB |
| 最終ジャッジ日時 | 2026-02-22 11:03:40 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 4 |
ソースコード
#include <stdio.h>
int main(void)
{
int A, B, C;
int ans = 0;
int i = 0;
scanf("%d %d %d", &A, &B, &C);
for(int N = 1; N < 200000; N++)
{
if((N * A - B == C) || (N * A == C))
{
printf("%d\n", N);
ans = 1;
}
}
if(ans == 0)
{
printf("%d", -1);
}
return 0;
}