結果
問題 |
No.2194 兄弟の掛け引き
|
ユーザー |
![]() |
提出日時 | 2023-02-17 19:00:59 |
言語 | Java (openjdk 23) |
結果 |
WA
|
実行時間 | - |
コード長 | 605 bytes |
コンパイル時間 | 2,045 ms |
コンパイル使用メモリ | 74,148 KB |
実行使用メモリ | 41,328 KB |
最終ジャッジ日時 | 2024-07-19 10:50:55 |
合計ジャッジ時間 | 4,743 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 12 WA * 2 |
ソースコード
import java.util.ArrayList; import java.util.List; import java.util.Scanner; public class Main { public static void main(String... args){ Scanner sc=new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int c = sc.nextInt(); int b0=c; int b1=c+b; boolean isAns=false; if(b0%a==0){ System.out.println(b0/a); isAns|=true; } if(b1%a==0){ System.out.println(b1/a); isAns|=true; } if(!isAns){ System.out.println(-1); } } }