結果

問題 No.538 N.G.S.
ユーザー mikan765
提出日時 2017-07-07 22:25:56
言語 Java
(openjdk 23)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 74,676 KB
実行使用メモリ 54,596 KB
最終ジャッジ日時 2024-10-06 10:05:02
合計ジャッジ時間 11,191 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 15 WA * 36
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.util.Arrays;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a1 = sc.nextInt();
		int a2 = sc.nextInt();
		int a3 = sc.nextInt();
		int r =(a3-a2)/(a2-a1);
		int d = a2-r*a1;
		System.out.println(a3*r+d);
	}
}
0