結果
| 問題 | 
                            No.2194 兄弟の掛け引き
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2023-07-28 03:30:40 | 
| 言語 | C  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 356 bytes | 
| コンパイル時間 | 100 ms | 
| コンパイル使用メモリ | 28,928 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-05 09:59:41 | 
| 合計ジャッジ時間 | 971 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / 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;
}