提出 #536145
ソースコード 拡げる
using LIB;
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
class Program
{
public static IO IO = new IO();
static void Main(string[] args)
{
double[] n = IO.DOUBLE(' ');
double td = (n[1] / 60) * 360;
double cd = ((n[0] % 12) / 12) * 360 + (n[1] / 60) * 30;
double min = Math.Min(Math.Abs(td - cd), Math.Abs(cd - td));
double min2 = Math.Min(Math.Abs(td - cd + 360), Math.Abs(cd + 360 - td));
IO.WRITE(Math.Min(min, min2));
IO.FLUSH();
}
}
namespace LIB
{
public class IO
{
private const int WMAX = 1000;
private StringBuilder S = new StringBuilder();
private T R<T>(Func<string, T> f) { return f(Console.ReadLine()); }
private T[] R<T>(Func<string, T> f, char c) { return STRING().Split(c).Select(f).ToArray(); }
private T[] R<T>(Func<string, T> f, int l) { T[] r = new T[l]; for (int i = 0; i < l; i++) { r[i] = R(f); } return r; }
private T[][] R<T>(Func<string, T> f, int l, char c) { T[][] r = new T[l][]; for (int i = 0; i < l; i++) { r[i] = R<T>(f, c); } return r; }
private void W<T>(Func<T, string> f, T v, bool lf = true) { S.Append(f(v)); if (lf == true) { S.Append('\n'); } if (S.Length >= WMAX) { FLUSH(); } }
public string STRING() { return R(s => s); }
public string[] STRING(char c) { return R(s => s, c); }
public string[] STRING(int l) { return R(s => s, l); }
public string[][] STRING(int l, char c) { return R(s => s, l, c); }
public int INT() { return R(int.Parse); }
public int[] INT(char c) { return R(int.Parse, c); }
public int[] INT(int l) { return R(int.Parse, l); }
public int[][] INT(int l, char c) { return R(int.Parse, l, c); }
public long LONG() { return R(long.Parse); }
public long[] LONG(char c) { return R(long.Parse, c); }
public long[] LONG(int l) { return R(long.Parse, l); }
public long[][] LONG(int l, char c) { return R(long.Parse, l, c); }
public double DOUBLE() { return R(double.Parse); }
public double[] DOUBLE(char c) { return R(double.Parse, c); }
public double[] DOUBLE(int l) { return R(double.Parse, l); }
public double[][] DOUBLE(int l, char c) { return R(double.Parse, l, c); }
public void WRITE(string s, bool lf = true) { W(v => v, s, lf); }
public void WRITE(int s, bool lf = true) { W(v => v.ToString(), s, lf); }
public void WRITE(long s, bool lf = true) { W(v => v.ToString(), s, lf); }
public void WRITE(double s, bool lf = true) { W(v => v.ToString(), s, lf); }
public void FLUSH() { Console.Write(S); S.Length = 0; }
}
}
提出情報
| 提出日時 |
|
| 問題 |
B - 時計盤 |
| ユーザ |
nokonoko |
| 言語 |
C# (Mono 3.2.1.0) |
| 得点 |
100 |
| コード長 |
2786 Byte |
| 結果 |
AC |
| 実行時間 |
150 ms |
| メモリ |
9912 KiB |
ジャッジ結果
| セット名 |
Sample |
All |
| 得点 / 配点 |
0 / 0 |
100 / 100 |
| 結果 |
|
|
| セット名 |
テストケース |
| Sample |
subtask0_1.txt, subtask0_2.txt, subtask0_3.txt, subtask0_4.txt |
| All |
0.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, 26.txt, 27.txt, 28.txt, 29.txt, 3.txt, 30.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, subtask0_1.txt, subtask0_2.txt, subtask0_3.txt, subtask0_4.txt |
| ケース名 |
結果 |
実行時間 |
メモリ |
| 0.txt |
AC |
145 ms |
9880 KiB |
| 1.txt |
AC |
143 ms |
9860 KiB |
| 10.txt |
AC |
144 ms |
9808 KiB |
| 11.txt |
AC |
144 ms |
9888 KiB |
| 12.txt |
AC |
144 ms |
9860 KiB |
| 13.txt |
AC |
148 ms |
9820 KiB |
| 14.txt |
AC |
146 ms |
9876 KiB |
| 15.txt |
AC |
145 ms |
9788 KiB |
| 16.txt |
AC |
144 ms |
9820 KiB |
| 17.txt |
AC |
143 ms |
9868 KiB |
| 18.txt |
AC |
148 ms |
9896 KiB |
| 19.txt |
AC |
145 ms |
9804 KiB |
| 2.txt |
AC |
143 ms |
9816 KiB |
| 20.txt |
AC |
143 ms |
9872 KiB |
| 21.txt |
AC |
144 ms |
9892 KiB |
| 22.txt |
AC |
142 ms |
9884 KiB |
| 23.txt |
AC |
142 ms |
9888 KiB |
| 24.txt |
AC |
145 ms |
9788 KiB |
| 25.txt |
AC |
144 ms |
9876 KiB |
| 26.txt |
AC |
144 ms |
9828 KiB |
| 27.txt |
AC |
144 ms |
9876 KiB |
| 28.txt |
AC |
143 ms |
9864 KiB |
| 29.txt |
AC |
144 ms |
9864 KiB |
| 3.txt |
AC |
143 ms |
9912 KiB |
| 30.txt |
AC |
147 ms |
9860 KiB |
| 4.txt |
AC |
144 ms |
9892 KiB |
| 5.txt |
AC |
145 ms |
9864 KiB |
| 6.txt |
AC |
145 ms |
9860 KiB |
| 7.txt |
AC |
144 ms |
9864 KiB |
| 8.txt |
AC |
145 ms |
9876 KiB |
| 9.txt |
AC |
145 ms |
9860 KiB |
| subtask0_1.txt |
AC |
150 ms |
9864 KiB |
| subtask0_2.txt |
AC |
144 ms |
9880 KiB |
| subtask0_3.txt |
AC |
144 ms |
9896 KiB |
| subtask0_4.txt |
AC |
146 ms |
9888 KiB |