結果
| 問題 |
No.1915 Addition
|
| コンテスト | |
| ユーザー |
shojin_pro
|
| 提出日時 | 2022-04-29 22:04:25 |
| 言語 | Java (openjdk 23) |
| 結果 |
AC
|
| 実行時間 | 154 ms / 2,000 ms |
| コード長 | 436 bytes |
| コンパイル時間 | 2,113 ms |
| コンパイル使用メモリ | 75,180 KB |
| 実行使用メモリ | 54,460 KB |
| 最終ジャッジ日時 | 2024-06-29 03:32:18 |
| 合計ジャッジ時間 | 5,070 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 |
ソースコード
import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
for(int i = 0; i < n; i++){
int a = sc.nextInt();
if(a % 2 == 0){
System.out.println(a/2);
}else{
System.out.println(a*2);
}
}
}
}
shojin_pro