Submission #1186895
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==0) System.out.println(n-1); else System.out.println(n+1); } }
Submission Info
Submission Time | |
---|---|
Task | B - ペア |
User | ne280154 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 271 Byte |
Status | AC |
Exec Time | 98 ms |
Memory | 24020 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 | 96 ms | 18644 KB |
001.txt | AC | 97 ms | 21972 KB |
002.txt | AC | 97 ms | 21844 KB |
003.txt | AC | 97 ms | 19924 KB |
004.txt | AC | 97 ms | 19284 KB |
005.txt | AC | 97 ms | 21844 KB |
006.txt | AC | 96 ms | 20564 KB |
007.txt | AC | 97 ms | 20820 KB |
008.txt | AC | 98 ms | 21076 KB |
009.txt | AC | 98 ms | 19796 KB |
010.txt | AC | 96 ms | 20820 KB |
011.txt | AC | 97 ms | 24020 KB |
012.txt | AC | 98 ms | 19156 KB |
013.txt | AC | 96 ms | 19412 KB |
014.txt | AC | 97 ms | 21844 KB |
015.txt | AC | 96 ms | 19796 KB |
016.txt | AC | 96 ms | 19924 KB |
017.txt | AC | 97 ms | 21584 KB |
018.txt | AC | 96 ms | 21716 KB |
019.txt | AC | 98 ms | 20564 KB |
s0.txt | AC | 98 ms | 19284 KB |
s1.txt | AC | 97 ms | 21716 KB |