Submission #186822


Source Code Expand

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.PriorityQueue;
import java.util.Map.Entry;
import java.util.Set;
import java.util.StringTokenizer;
 
public class Main {
	
	
	
	public static void main(String[] args) throws IOException{
		Scanner sc = new Scanner(System.in);
	
		final int N = sc.nextInt();
		
		System.out.println((N % 12) + 1);
	}
	
	public static class Scanner {
		
		private BufferedReader br;
		private StringTokenizer tok;
		
		public Scanner(InputStream is) throws IOException{
			br = new BufferedReader(new InputStreamReader(is));
			getLine();
		}
		
		private void getLine() throws IOException{
			while(tok == null || !tok.hasMoreTokens()){
				tok = new StringTokenizer(br.readLine());
			}
		}
		
		private boolean hasNext(){
			return tok.hasMoreTokens();
		}
		
		public String next() throws IOException{
			if(!hasNext()){
				getLine();
			}
			
			return tok.nextToken();
		}
		
		public byte nextByte() throws IOException{
			return Byte.parseByte(this.next());
		}
		
		public short nextShort() throws IOException{
			return Short.parseShort(this.next());
		}
		
		public int nextInt() throws IOException{
			return Integer.parseInt(this.next());
		}
		
		public long nextLong() throws IOException{
			return Long.parseLong(this.next());
		}
		
		public float nextFloat() throws IOException{
			return Float.parseFloat(this.next());
		}
		
		public double nextDouble() throws IOException{
			return Double.parseDouble(this.next());
		}
		
		public BigInteger nextBigInteger() throws IOException{
			return new BigInteger(this.next());
		}
		
		public BigDecimal nextBigDecimal() throws IOException{
			return new BigDecimal(this.next());
		}
	}
}

Submission Info

Submission Time
Task A - 来月は何月?
User mondatto
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 2083 Byte
Status AC
Exec Time 416 ms
Memory 20660 KB

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 12
Set Name Test Cases
All test_1.txt, test_10.txt, test_11.txt, test_12.txt, test_2.txt, test_3.txt, test_4.txt, test_5.txt, test_6.txt, test_7.txt, test_8.txt, test_9.txt
Case Name Status Exec Time Memory
test_1.txt AC 416 ms 20576 KB
test_10.txt AC 376 ms 20660 KB
test_11.txt AC 385 ms 20528 KB
test_12.txt AC 382 ms 20532 KB
test_2.txt AC 374 ms 20656 KB
test_3.txt AC 377 ms 20660 KB
test_4.txt AC 377 ms 20660 KB
test_5.txt AC 375 ms 20528 KB
test_6.txt AC 384 ms 20656 KB
test_7.txt AC 398 ms 20652 KB
test_8.txt AC 404 ms 20656 KB
test_9.txt AC 397 ms 20524 KB