結果

問題 No.308 素数は通れません
ユーザー kuuso1
提出日時 2015-12-01 02:15:28
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,478 bytes
コンパイル時間 2,388 ms
コンパイル使用メモリ 114,640 KB
実行使用メモリ 27,728 KB
最終ジャッジ日時 2024-09-14 06:17:25
合計ジャッジ時間 6,849 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 99 WA * 8
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class TEST{
	static void Main(){
		Sol mySol =new Sol();
		mySol.Solve();
	}
}

class Sol{
	public void Solve(){
		
		N=0;
		if(S.Length<4){
			N=long.Parse(S);
		}else{
			N=long.Parse(S.Substring(S.Length-4));
		}
		int ans=0;
		switch(N){
			case 4:	ans=3;break;
			case 6:	ans=5;break;
			case 8:	ans=7;break;
			case 9:	ans=7;break;
			case 10:	ans=7;break;
			case 15:	ans=7;break;
			case 16:	ans=7;break;
			case 22:	ans=7;break;
			case 20:	ans=19;break;
			case 21:	ans=19;break;
			case 14:	ans=13;break;
			case 12:	ans=11;break;
			case 33:	ans=8;break;
			case 57:	ans=8;break;
			case 65:	ans=8;break;
			default:
				if(N%8==1){
					ans=14;
				}else{
					ans=8;
				}break;
		}
		Console.WriteLine(ans);
		
		
		
		
	}
	String S;
	long N;
	public Sol(){
		S=rs();
	}




	static String rs(){return Console.ReadLine();}
	static int ri(){return int.Parse(Console.ReadLine());}
	static long rl(){return long.Parse(Console.ReadLine());}
	static double rd(){return double.Parse(Console.ReadLine());}
	static String[] rsa(){return Console.ReadLine().Split(' ');}
	static int[] ria(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>int.Parse(e));}
	static long[] rla(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>long.Parse(e));}
	static double[] rda(){return Array.ConvertAll(Console.ReadLine().Split(' '),e=>double.Parse(e));}
}
0