結果
問題 | No.747 循環小数N桁目 Hard |
ユーザー | fgwiebfaoish |
提出日時 | 2020-03-27 17:10:04 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
AC
|
実行時間 | 25 ms / 2,000 ms |
コード長 | 2,845 bytes |
コンパイル時間 | 2,250 ms |
コンパイル使用メモリ | 115,572 KB |
実行使用メモリ | 17,792 KB |
最終ジャッジ日時 | 2024-06-10 16:21:09 |
合計ジャッジ時間 | 8,369 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 20 ms
17,792 KB |
testcase_01 | AC | 20 ms
17,408 KB |
testcase_02 | AC | 19 ms
17,536 KB |
testcase_03 | AC | 18 ms
17,408 KB |
testcase_04 | AC | 19 ms
17,280 KB |
testcase_05 | AC | 18 ms
17,664 KB |
testcase_06 | AC | 18 ms
17,536 KB |
testcase_07 | AC | 18 ms
17,536 KB |
testcase_08 | AC | 21 ms
17,664 KB |
testcase_09 | AC | 21 ms
17,408 KB |
testcase_10 | AC | 20 ms
17,664 KB |
testcase_11 | AC | 20 ms
17,536 KB |
testcase_12 | AC | 18 ms
17,536 KB |
testcase_13 | AC | 18 ms
17,664 KB |
testcase_14 | AC | 18 ms
17,536 KB |
testcase_15 | AC | 18 ms
17,280 KB |
testcase_16 | AC | 18 ms
17,280 KB |
testcase_17 | AC | 17 ms
17,408 KB |
testcase_18 | AC | 19 ms
17,152 KB |
testcase_19 | AC | 19 ms
17,408 KB |
testcase_20 | AC | 19 ms
17,664 KB |
testcase_21 | AC | 19 ms
17,408 KB |
testcase_22 | AC | 18 ms
17,536 KB |
testcase_23 | AC | 18 ms
17,408 KB |
testcase_24 | AC | 19 ms
17,792 KB |
testcase_25 | AC | 18 ms
17,536 KB |
testcase_26 | AC | 19 ms
17,792 KB |
testcase_27 | AC | 20 ms
17,664 KB |
testcase_28 | AC | 19 ms
17,664 KB |
testcase_29 | AC | 20 ms
17,664 KB |
testcase_30 | AC | 20 ms
17,408 KB |
testcase_31 | AC | 19 ms
17,536 KB |
testcase_32 | AC | 18 ms
17,536 KB |
testcase_33 | AC | 21 ms
17,340 KB |
testcase_34 | AC | 19 ms
17,408 KB |
testcase_35 | AC | 20 ms
17,280 KB |
testcase_36 | AC | 19 ms
17,536 KB |
testcase_37 | AC | 19 ms
17,536 KB |
testcase_38 | AC | 19 ms
17,360 KB |
testcase_39 | AC | 20 ms
17,536 KB |
testcase_40 | AC | 21 ms
17,616 KB |
testcase_41 | AC | 20 ms
17,484 KB |
testcase_42 | AC | 19 ms
17,484 KB |
testcase_43 | AC | 19 ms
17,280 KB |
testcase_44 | AC | 21 ms
17,484 KB |
testcase_45 | AC | 20 ms
17,360 KB |
testcase_46 | AC | 19 ms
17,492 KB |
testcase_47 | AC | 19 ms
17,484 KB |
testcase_48 | AC | 18 ms
17,408 KB |
testcase_49 | AC | 19 ms
17,360 KB |
testcase_50 | AC | 19 ms
17,536 KB |
testcase_51 | AC | 20 ms
17,280 KB |
testcase_52 | AC | 19 ms
17,408 KB |
testcase_53 | AC | 21 ms
17,488 KB |
testcase_54 | AC | 20 ms
17,492 KB |
testcase_55 | AC | 20 ms
17,492 KB |
testcase_56 | AC | 20 ms
17,472 KB |
testcase_57 | AC | 19 ms
17,408 KB |
testcase_58 | AC | 23 ms
17,220 KB |
testcase_59 | AC | 21 ms
17,620 KB |
testcase_60 | AC | 20 ms
17,228 KB |
testcase_61 | AC | 21 ms
17,360 KB |
testcase_62 | AC | 20 ms
17,484 KB |
testcase_63 | AC | 20 ms
17,608 KB |
testcase_64 | AC | 20 ms
17,408 KB |
testcase_65 | AC | 19 ms
17,408 KB |
testcase_66 | AC | 20 ms
17,452 KB |
testcase_67 | AC | 21 ms
17,228 KB |
testcase_68 | AC | 22 ms
17,484 KB |
testcase_69 | AC | 22 ms
17,480 KB |
testcase_70 | AC | 20 ms
17,536 KB |
testcase_71 | AC | 21 ms
17,280 KB |
testcase_72 | AC | 20 ms
17,536 KB |
testcase_73 | AC | 21 ms
17,356 KB |
testcase_74 | AC | 20 ms
17,360 KB |
testcase_75 | AC | 19 ms
17,364 KB |
testcase_76 | AC | 20 ms
17,604 KB |
testcase_77 | AC | 19 ms
17,092 KB |
testcase_78 | AC | 19 ms
17,236 KB |
testcase_79 | AC | 20 ms
17,492 KB |
testcase_80 | AC | 20 ms
17,480 KB |
testcase_81 | AC | 20 ms
17,536 KB |
testcase_82 | AC | 20 ms
17,500 KB |
testcase_83 | AC | 20 ms
17,536 KB |
testcase_84 | AC | 20 ms
17,360 KB |
testcase_85 | AC | 20 ms
17,352 KB |
testcase_86 | AC | 21 ms
17,484 KB |
testcase_87 | AC | 21 ms
17,228 KB |
testcase_88 | AC | 20 ms
17,468 KB |
testcase_89 | AC | 19 ms
17,360 KB |
testcase_90 | AC | 20 ms
17,488 KB |
testcase_91 | AC | 20 ms
17,376 KB |
testcase_92 | AC | 25 ms
17,468 KB |
testcase_93 | AC | 21 ms
17,352 KB |
testcase_94 | AC | 20 ms
17,356 KB |
testcase_95 | AC | 20 ms
17,360 KB |
testcase_96 | AC | 21 ms
17,608 KB |
testcase_97 | AC | 21 ms
17,472 KB |
testcase_98 | AC | 22 ms
17,488 KB |
testcase_99 | AC | 22 ms
17,496 KB |
testcase_100 | AC | 21 ms
17,352 KB |
testcase_101 | AC | 20 ms
17,480 KB |
testcase_102 | AC | 20 ms
17,468 KB |
testcase_103 | AC | 20 ms
17,232 KB |
testcase_104 | AC | 21 ms
17,224 KB |
testcase_105 | AC | 20 ms
17,608 KB |
testcase_106 | AC | 21 ms
17,480 KB |
testcase_107 | AC | 21 ms
17,612 KB |
testcase_108 | AC | 21 ms
17,592 KB |
testcase_109 | AC | 20 ms
17,232 KB |
testcase_110 | AC | 20 ms
17,592 KB |
testcase_111 | AC | 20 ms
17,600 KB |
testcase_112 | AC | 21 ms
17,352 KB |
testcase_113 | AC | 20 ms
17,360 KB |
testcase_114 | AC | 21 ms
17,348 KB |
testcase_115 | AC | 21 ms
17,600 KB |
testcase_116 | AC | 19 ms
17,616 KB |
testcase_117 | AC | 20 ms
17,356 KB |
testcase_118 | AC | 21 ms
17,344 KB |
testcase_119 | AC | 21 ms
17,340 KB |
testcase_120 | AC | 21 ms
17,356 KB |
testcase_121 | AC | 22 ms
17,352 KB |
testcase_122 | AC | 21 ms
17,480 KB |
testcase_123 | AC | 21 ms
17,224 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Collections; using System.Collections.Specialized; using System.Linq; using System.Text; using System.IO; using System.Reflection; using static System.Math; using System.Numerics; static class Program{ const int mod=(int)1e9+7; const double eps=1e-11; static void Main(){ Sc sc=new Sc(); var s=sc.S; var t=sc.S; int p=0,g=0; var z="4285714"; for(int i = 0;i<s.Length;i++) { p*=10; p+=s[i]-'0'; p%=6; } for(int i = 0;i<t.Length;i++) { g*=10; g+=t[i]-'0'; g%=4; } int ans=(int)Pow(p,g+4)%6; Console.WriteLine("{0}",z[ans]); } } public class Sc{ public int I{get{return int.Parse(Console.ReadLine());}} public long L{get{return long.Parse(Console.ReadLine());}} public double D{get{return double.Parse(Console.ReadLine());}} public string S{get{return Console.ReadLine();}} public int[] Ia{get{return Array.ConvertAll(Console.ReadLine().Split(),int.Parse);}} public long[] La{get{return Array.ConvertAll(Console.ReadLine().Split(),long.Parse);}} public double[] Da{get{return Array.ConvertAll(Console.ReadLine().Split(),double.Parse);}} public string[] Sa{get{return Console.ReadLine().Split();}} public object[] Oa{get{return Console.ReadLine().Split();}} public int[] Ia2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),int.Parse);}} public int[] Ia3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),int.Parse);} public int[] Ia3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),int.Parse);} public long[] La2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),long.Parse);}} public long[] La3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),long.Parse);} public long[] La3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),long.Parse);} public double[] Da2{get{return Array.ConvertAll(("0 "+Console.ReadLine()+" 0").Split(),double.Parse);}} public double[] Da3(int a){return Array.ConvertAll((a.ToString()+" "+Console.ReadLine()).Split(),double.Parse);} public double[] Da3(bool a,int b,bool c,int d){return Array.ConvertAll(((a?b.ToString()+" ":"")+Console.ReadLine()+(c?" "+d.ToString():"")).Split(),double.Parse);} public T[] Arr<T>(int n,Func<T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f();}return a;} public T[] Arr<T>(int n,Func<int,T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i);}return a;} public T[] Arr<T>(int n,Func<string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(Console.ReadLine().Split());}return a;} public T[] Arr<T>(int n,Func<int,string[],T> f){var a=new T[n];for(int i=0;i<n;i++){a[i]=f(i,Console.ReadLine().Split());}return a;} }