Submission #1185292
Source Code Expand
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n; n = sc.nextInt(); if(n % 2 == 1) { System.out.println(n + 1); }else{ System.out.println(n - 1); } } }
Submission Info
Submission Time | |
---|---|
Task | B - ペア |
User | sukan |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 260 Byte |
Status | AC |
Exec Time | 98 ms |
Memory | 21972 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s0.txt, s1.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, s0.txt, s1.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | AC | 93 ms | 19412 KB |
001.txt | AC | 92 ms | 19540 KB |
002.txt | AC | 91 ms | 21716 KB |
003.txt | AC | 92 ms | 20052 KB |
004.txt | AC | 97 ms | 18644 KB |
005.txt | AC | 92 ms | 18772 KB |
006.txt | AC | 98 ms | 21844 KB |
007.txt | AC | 91 ms | 21716 KB |
008.txt | AC | 90 ms | 19796 KB |
009.txt | AC | 91 ms | 21716 KB |
010.txt | AC | 92 ms | 21204 KB |
011.txt | AC | 92 ms | 16852 KB |
012.txt | AC | 91 ms | 19668 KB |
013.txt | AC | 92 ms | 20692 KB |
014.txt | AC | 91 ms | 21972 KB |
015.txt | AC | 92 ms | 19668 KB |
016.txt | AC | 91 ms | 18772 KB |
017.txt | AC | 91 ms | 21972 KB |
018.txt | AC | 91 ms | 18900 KB |
019.txt | AC | 91 ms | 19028 KB |
s0.txt | AC | 93 ms | 17620 KB |
s1.txt | AC | 98 ms | 18772 KB |