結果
| 問題 | 
                            No.2765 Cross Product
                             | 
                    
| コンテスト | |
| ユーザー | 
                             ks2m
                         | 
                    
| 提出日時 | 2024-05-31 22:00:37 | 
| 言語 | Java  (openjdk 23)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 152 ms / 2,000 ms | 
| コード長 | 607 bytes | 
| コンパイル時間 | 3,178 ms | 
| コンパイル使用メモリ | 74,772 KB | 
| 実行使用メモリ | 44,824 KB | 
| 最終ジャッジ日時 | 2024-12-20 23:25:03 | 
| 合計ジャッジ時間 | 7,549 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 23 | 
ソースコード
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int[] a = new int[6];
		for (int i = 0; i < 3; i++) {
			a[i] = sc.nextInt();
			a[i + 3] = a[i];
		}
		int[] b = new int[6];
		for (int i = 0; i < 3; i++) {
			b[i] = sc.nextInt();
			b[i + 3] = b[i];
		}
		sc.close();
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < 3; i++) {
			int c = a[i + 1] * b[i + 2] - a[i + 2] * b[i + 1];
			sb.append(c).append(' ');
		}
		sb.deleteCharAt(sb.length() - 1);
		System.out.println(sb.toString());
	}
}
            
            
            
        
            
ks2m