結果

問題 No.747 循環小数N桁目 Hard
ユーザー bluemeganebluemegane
提出日時 2018-10-20 09:26:45
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 809 bytes
コンパイル時間 4,035 ms
コンパイル使用メモリ 108,968 KB
実行使用メモリ 27,880 KB
最終ジャッジ日時 2024-04-29 19:26:29
合計ジャッジ時間 6,692 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
17,664 KB
testcase_01 AC 20 ms
17,920 KB
testcase_02 AC 20 ms
17,536 KB
testcase_03 AC 20 ms
17,408 KB
testcase_04 AC 21 ms
17,920 KB
testcase_05 AC 21 ms
17,792 KB
testcase_06 AC 20 ms
18,048 KB
testcase_07 AC 20 ms
18,048 KB
testcase_08 AC 20 ms
17,920 KB
testcase_09 WA -
testcase_10 AC 21 ms
17,408 KB
testcase_11 AC 20 ms
17,536 KB
testcase_12 AC 20 ms
17,408 KB
testcase_13 AC 20 ms
17,408 KB
testcase_14 WA -
testcase_15 AC 21 ms
17,408 KB
testcase_16 AC 20 ms
17,536 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 20 ms
17,536 KB
testcase_20 AC 18 ms
17,536 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 19 ms
17,536 KB
testcase_24 AC 20 ms
17,280 KB
testcase_25 WA -
testcase_26 AC 21 ms
17,664 KB
testcase_27 AC 20 ms
17,280 KB
testcase_28 AC 19 ms
17,536 KB
testcase_29 AC 20 ms
17,408 KB
testcase_30 AC 19 ms
17,152 KB
testcase_31 AC 20 ms
17,536 KB
testcase_32 AC 20 ms
17,664 KB
testcase_33 AC 21 ms
17,596 KB
testcase_34 AC 21 ms
17,536 KB
testcase_35 AC 19 ms
17,408 KB
testcase_36 AC 19 ms
17,536 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 AC 21 ms
17,596 KB
testcase_41 AC 21 ms
17,476 KB
testcase_42 AC 21 ms
17,468 KB
testcase_43 AC 19 ms
17,664 KB
testcase_44 AC 20 ms
17,596 KB
testcase_45 AC 21 ms
17,728 KB
testcase_46 AC 21 ms
17,472 KB
testcase_47 AC 21 ms
17,728 KB
testcase_48 AC 21 ms
17,408 KB
testcase_49 AC 19 ms
17,588 KB
testcase_50 AC 20 ms
17,536 KB
testcase_51 WA -
testcase_52 WA -
testcase_53 AC 22 ms
17,592 KB
testcase_54 AC 22 ms
17,580 KB
testcase_55 AC 24 ms
17,720 KB
testcase_56 WA -
testcase_57 AC 21 ms
17,664 KB
testcase_58 AC 22 ms
17,480 KB
testcase_59 AC 21 ms
17,860 KB
testcase_60 AC 22 ms
17,732 KB
testcase_61 AC 21 ms
17,464 KB
testcase_62 AC 21 ms
17,724 KB
testcase_63 AC 21 ms
17,468 KB
testcase_64 WA -
testcase_65 AC 20 ms
17,408 KB
testcase_66 AC 20 ms
17,468 KB
testcase_67 AC 20 ms
17,608 KB
testcase_68 WA -
testcase_69 AC 21 ms
17,596 KB
testcase_70 AC 19 ms
17,792 KB
testcase_71 AC 20 ms
17,408 KB
testcase_72 AC 20 ms
17,664 KB
testcase_73 AC 22 ms
17,472 KB
testcase_74 AC 22 ms
17,472 KB
testcase_75 AC 20 ms
17,664 KB
testcase_76 AC 20 ms
17,604 KB
testcase_77 AC 19 ms
17,604 KB
testcase_78 AC 19 ms
17,212 KB
testcase_79 AC 19 ms
17,468 KB
testcase_80 AC 20 ms
17,592 KB
testcase_81 AC 20 ms
17,792 KB
testcase_82 AC 20 ms
17,664 KB
testcase_83 AC 21 ms
17,512 KB
testcase_84 AC 22 ms
17,340 KB
testcase_85 AC 22 ms
17,336 KB
testcase_86 AC 20 ms
17,472 KB
testcase_87 WA -
testcase_88 AC 21 ms
17,332 KB
testcase_89 AC 21 ms
17,152 KB
testcase_90 WA -
testcase_91 AC 21 ms
17,348 KB
testcase_92 AC 20 ms
17,352 KB
testcase_93 AC 20 ms
17,588 KB
testcase_94 AC 20 ms
17,592 KB
testcase_95 AC 22 ms
17,340 KB
testcase_96 AC 21 ms
17,600 KB
testcase_97 AC 21 ms
17,340 KB
testcase_98 AC 20 ms
17,476 KB
testcase_99 WA -
testcase_100 AC 21 ms
17,592 KB
testcase_101 WA -
testcase_102 AC 22 ms
17,476 KB
testcase_103 AC 20 ms
17,600 KB
testcase_104 AC 20 ms
17,328 KB
testcase_105 AC 21 ms
17,728 KB
testcase_106 AC 20 ms
17,728 KB
testcase_107 AC 20 ms
17,592 KB
testcase_108 AC 21 ms
17,472 KB
testcase_109 AC 21 ms
17,340 KB
testcase_110 AC 21 ms
17,836 KB
testcase_111 AC 21 ms
17,700 KB
testcase_112 AC 21 ms
17,592 KB
testcase_113 WA -
testcase_114 AC 20 ms
17,472 KB
testcase_115 AC 21 ms
17,468 KB
testcase_116 AC 21 ms
17,460 KB
testcase_117 AC 20 ms
17,468 KB
testcase_118 AC 21 ms
17,336 KB
testcase_119 AC 20 ms
17,468 KB
testcase_120 AC 20 ms
17,604 KB
testcase_121 AC 21 ms
17,584 KB
testcase_122 AC 20 ms
17,600 KB
testcase_123 AC 22 ms
17,716 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    public static void Main()
    {
        var s = Console.ReadLine().Trim();
        var t = Console.ReadLine().Trim();
        var s2 = check6(s);
        var t2 = check6(t);
        var a = (int)Pow(s2, t2) % 6;
        Console.WriteLine("428571"[a]);
    }
    public static int check6(string s)
    {
        if (s.Length == 1) return int.Parse(s) % 6;
        var sum = 0L;
        var sL = s.Length;
        for (int i = 0; i < sL - 1; i++)
            sum += s[i] - '0';
        var b = s[sL - 1] - '0';
        for (int i = 0; i <= 9; i++)
            if (((sum + i) % 3 == 0) && i % 2 == 0 )
            {
                if (b - i < 0) return b - i + 6;
                else return (b - i) % 6;
            }
        return 0;
    }
}
0