結果

問題 No.353 ヘイトプラス
ユーザー mits58mits58
提出日時 2016-07-02 01:03:54
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 2,123 ms
コンパイル使用メモリ 73,952 KB
実行使用メモリ 41,552 KB
最終ジャッジ日時 2024-04-20 06:43:16
合計ジャッジ時間 3,471 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
41,512 KB
testcase_01 AC 110 ms
41,260 KB
testcase_02 AC 113 ms
41,292 KB
testcase_03 AC 110 ms
40,068 KB
testcase_04 WA -
testcase_05 AC 101 ms
41,336 KB
testcase_06 AC 114 ms
41,552 KB
testcase_07 AC 112 ms
41,264 KB
testcase_08 AC 111 ms
41,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			long a=sc.nextLong();
			long b=sc.nextLong();
			if(a==b) System.out.println(0);
			else System.out.println((a*a-b*b)/(a-b));
		}
	}
}
0