結果
| 問題 | No.87 Advent Calendar Problem |
| コンテスト | |
| ユーザー |
holeguma
|
| 提出日時 | 2015-08-14 18:01:24 |
| 言語 | Java (openjdk 25.0.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 1,350 bytes |
| 記録 | |
| コンパイル時間 | 1,938 ms |
| コンパイル使用メモリ | 78,308 KB |
| 実行使用メモリ | 37,356 KB |
| 最終ジャッジ日時 | 2024-07-18 09:28:30 |
| 合計ジャッジ時間 | 3,760 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 6 RE * 18 |
ソースコード
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;
class Main{
static final PrintWriter out=new PrintWriter(System.out);
static final int INF=Integer.MAX_VALUE/2;
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line=br.readLine())!=null&&!line.isEmpty()){
int n=Integer.parseInt(line);
long ans=0;
ans+=n-2014;
ans+=(int)n-2012/4;
ans-=(int)n-2000/100;
ans+=(int)n-2000/400;
out.println(ans);
out.flush();
}
}
static class Pair{
int x;
int y;
Pair(int x,int y){
this.x=x; this.y=y;
}
}
static class Edge{
int from;
int to;
int cost;
Edge(int from,int to,int cost){
this.from=from; this.to=to; this.cost=cost;
}
Edge(int to,int cost){
this.to=to; this.cost=cost;
}
}
static class Node{
int d;
int v;
Node(int d,int v){
this.d=d; this.v=v;
}
final static Comparator<Node> DISTANCE_ORDER=new DistanceOrderComparator();
static class DistanceOrderComparator implements Comparator<Node>{
public int compare(Node n1,Node n2){
return (n1.d>n2.d)?1:(n1.d<n2.d)?-1:0;
}
}
}
}
holeguma