結果
問題 | No.747 循環小数N桁目 Hard |
ユーザー | bluemegane |
提出日時 | 2018-10-20 15:45:17 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,072 bytes |
コンパイル時間 | 4,531 ms |
コンパイル使用メモリ | 107,004 KB |
実行使用メモリ | 25,992 KB |
最終ジャッジ日時 | 2024-11-19 02:35:32 |
合計ジャッジ時間 | 6,912 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 21 ms
17,536 KB |
testcase_01 | AC | 21 ms
17,664 KB |
testcase_02 | AC | 21 ms
17,408 KB |
testcase_03 | AC | 21 ms
17,536 KB |
testcase_04 | AC | 22 ms
17,536 KB |
testcase_05 | AC | 20 ms
17,536 KB |
testcase_06 | AC | 21 ms
17,664 KB |
testcase_07 | AC | 21 ms
17,664 KB |
testcase_08 | AC | 23 ms
17,664 KB |
testcase_09 | AC | 22 ms
17,280 KB |
testcase_10 | WA | - |
testcase_11 | AC | 21 ms
17,408 KB |
testcase_12 | AC | 22 ms
17,152 KB |
testcase_13 | AC | 22 ms
17,536 KB |
testcase_14 | AC | 23 ms
17,408 KB |
testcase_15 | AC | 22 ms
17,664 KB |
testcase_16 | AC | 22 ms
17,408 KB |
testcase_17 | AC | 22 ms
17,408 KB |
testcase_18 | AC | 21 ms
17,280 KB |
testcase_19 | AC | 21 ms
17,536 KB |
testcase_20 | AC | 22 ms
17,664 KB |
testcase_21 | AC | 20 ms
17,792 KB |
testcase_22 | AC | 21 ms
17,408 KB |
testcase_23 | AC | 22 ms
17,408 KB |
testcase_24 | WA | - |
testcase_25 | AC | 21 ms
17,408 KB |
testcase_26 | WA | - |
testcase_27 | AC | 22 ms
17,536 KB |
testcase_28 | AC | 21 ms
17,408 KB |
testcase_29 | AC | 22 ms
17,536 KB |
testcase_30 | AC | 21 ms
17,408 KB |
testcase_31 | AC | 21 ms
17,280 KB |
testcase_32 | AC | 21 ms
17,408 KB |
testcase_33 | AC | 22 ms
17,492 KB |
testcase_34 | AC | 21 ms
17,280 KB |
testcase_35 | AC | 21 ms
17,408 KB |
testcase_36 | AC | 22 ms
17,280 KB |
testcase_37 | AC | 21 ms
17,408 KB |
testcase_38 | AC | 22 ms
17,376 KB |
testcase_39 | AC | 21 ms
17,280 KB |
testcase_40 | WA | - |
testcase_41 | AC | 21 ms
17,376 KB |
testcase_42 | AC | 20 ms
17,604 KB |
testcase_43 | AC | 22 ms
17,280 KB |
testcase_44 | AC | 22 ms
17,492 KB |
testcase_45 | AC | 22 ms
17,504 KB |
testcase_46 | AC | 22 ms
17,504 KB |
testcase_47 | AC | 21 ms
17,616 KB |
testcase_48 | AC | 20 ms
17,664 KB |
testcase_49 | AC | 20 ms
17,612 KB |
testcase_50 | AC | 20 ms
17,408 KB |
testcase_51 | AC | 21 ms
17,408 KB |
testcase_52 | AC | 21 ms
17,664 KB |
testcase_53 | AC | 23 ms
17,368 KB |
testcase_54 | WA | - |
testcase_55 | AC | 22 ms
17,508 KB |
testcase_56 | AC | 22 ms
17,352 KB |
testcase_57 | AC | 22 ms
17,280 KB |
testcase_58 | AC | 23 ms
17,620 KB |
testcase_59 | AC | 22 ms
17,240 KB |
testcase_60 | AC | 22 ms
17,636 KB |
testcase_61 | AC | 23 ms
17,240 KB |
testcase_62 | AC | 22 ms
17,492 KB |
testcase_63 | AC | 21 ms
17,368 KB |
testcase_64 | AC | 21 ms
17,408 KB |
testcase_65 | AC | 20 ms
17,536 KB |
testcase_66 | AC | 21 ms
17,500 KB |
testcase_67 | AC | 22 ms
17,496 KB |
testcase_68 | AC | 20 ms
17,492 KB |
testcase_69 | AC | 21 ms
17,628 KB |
testcase_70 | WA | - |
testcase_71 | AC | 21 ms
17,408 KB |
testcase_72 | AC | 22 ms
17,636 KB |
testcase_73 | AC | 24 ms
17,344 KB |
testcase_74 | AC | 23 ms
17,632 KB |
testcase_75 | AC | 23 ms
17,496 KB |
testcase_76 | AC | 23 ms
17,496 KB |
testcase_77 | AC | 21 ms
17,504 KB |
testcase_78 | AC | 23 ms
17,488 KB |
testcase_79 | AC | 22 ms
17,504 KB |
testcase_80 | AC | 22 ms
17,628 KB |
testcase_81 | AC | 23 ms
17,408 KB |
testcase_82 | AC | 21 ms
17,636 KB |
testcase_83 | AC | 22 ms
17,408 KB |
testcase_84 | AC | 21 ms
17,368 KB |
testcase_85 | AC | 20 ms
17,496 KB |
testcase_86 | AC | 24 ms
17,236 KB |
testcase_87 | AC | 24 ms
17,496 KB |
testcase_88 | AC | 21 ms
17,500 KB |
testcase_89 | AC | 22 ms
17,372 KB |
testcase_90 | AC | 22 ms
17,612 KB |
testcase_91 | AC | 21 ms
17,356 KB |
testcase_92 | AC | 21 ms
17,624 KB |
testcase_93 | AC | 23 ms
17,372 KB |
testcase_94 | AC | 23 ms
17,496 KB |
testcase_95 | AC | 22 ms
17,380 KB |
testcase_96 | AC | 23 ms
17,360 KB |
testcase_97 | AC | 22 ms
17,496 KB |
testcase_98 | WA | - |
testcase_99 | AC | 24 ms
17,620 KB |
testcase_100 | AC | 23 ms
17,496 KB |
testcase_101 | AC | 23 ms
17,252 KB |
testcase_102 | AC | 22 ms
17,488 KB |
testcase_103 | AC | 22 ms
17,620 KB |
testcase_104 | AC | 22 ms
17,504 KB |
testcase_105 | AC | 24 ms
17,480 KB |
testcase_106 | AC | 23 ms
17,500 KB |
testcase_107 | AC | 24 ms
17,368 KB |
testcase_108 | AC | 23 ms
17,612 KB |
testcase_109 | AC | 24 ms
17,476 KB |
testcase_110 | AC | 23 ms
17,364 KB |
testcase_111 | AC | 23 ms
17,476 KB |
testcase_112 | AC | 23 ms
17,232 KB |
testcase_113 | AC | 22 ms
17,372 KB |
testcase_114 | AC | 22 ms
17,496 KB |
testcase_115 | AC | 23 ms
17,488 KB |
testcase_116 | AC | 22 ms
17,356 KB |
testcase_117 | AC | 22 ms
17,628 KB |
testcase_118 | WA | - |
testcase_119 | AC | 23 ms
17,612 KB |
testcase_120 | AC | 22 ms
17,368 KB |
testcase_121 | AC | 21 ms
17,500 KB |
testcase_122 | WA | - |
testcase_123 | AC | 21 ms
17,240 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; public class Hello { public static void Main() { var n = Console.ReadLine().Trim(); var k = Console.ReadLine().Trim(); var a = getMOD6(n); var b = k[k.Length - 1] - '0'; var ans = getAns(a, b); Console.WriteLine(ans); } public static int getAns (int a , int b ) { var t = "428571"; if (a == 2) if (b % 2 == 0) return 7; else return 8; else if (a == 5) if (b % 2 == 0) return 1; else return 5; else return t[a] - '0'; } public static int getMOD6(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; } }