結果

問題 No.438 Cwwプログラミング入門
ユーザー convexineqconvexineq
提出日時 2021-02-16 05:02:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 543 bytes
コンパイル時間 1,790 ms
コンパイル使用メモリ 86,600 KB
実行使用メモリ 75,940 KB
最終ジャッジ日時 2023-10-01 03:18:10
合計ジャッジ時間 17,992 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
75,780 KB
testcase_01 AC 75 ms
75,820 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 74 ms
75,592 KB
testcase_09 AC 73 ms
71,068 KB
testcase_10 AC 76 ms
75,856 KB
testcase_11 AC 75 ms
75,700 KB
testcase_12 AC 77 ms
75,660 KB
testcase_13 WA -
testcase_14 AC 76 ms
75,496 KB
testcase_15 WA -
testcase_16 AC 73 ms
75,624 KB
testcase_17 AC 73 ms
75,612 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 75 ms
75,572 KB
testcase_21 AC 74 ms
75,560 KB
testcase_22 AC 76 ms
75,704 KB
testcase_23 AC 75 ms
75,688 KB
testcase_24 WA -
testcase_25 AC 75 ms
75,680 KB
testcase_26 AC 76 ms
75,668 KB
testcase_27 WA -
testcase_28 AC 71 ms
71,096 KB
testcase_29 AC 76 ms
75,588 KB
testcase_30 WA -
testcase_31 AC 76 ms
75,704 KB
testcase_32 AC 77 ms
75,768 KB
testcase_33 AC 75 ms
75,700 KB
testcase_34 AC 71 ms
71,064 KB
testcase_35 AC 76 ms
75,828 KB
testcase_36 AC 75 ms
75,940 KB
testcase_37 AC 76 ms
75,936 KB
testcase_38 WA -
testcase_39 AC 79 ms
75,596 KB
testcase_40 WA -
testcase_41 AC 75 ms
75,700 KB
testcase_42 AC 74 ms
75,596 KB
testcase_43 WA -
testcase_44 AC 73 ms
75,560 KB
testcase_45 AC 76 ms
75,740 KB
testcase_46 AC 76 ms
75,588 KB
testcase_47 AC 78 ms
75,812 KB
testcase_48 WA -
testcase_49 AC 72 ms
75,700 KB
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 72 ms
75,616 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 AC 73 ms
75,556 KB
testcase_56 AC 76 ms
75,444 KB
testcase_57 AC 75 ms
75,604 KB
testcase_58 WA -
testcase_59 AC 70 ms
71,132 KB
testcase_60 WA -
testcase_61 AC 71 ms
71,256 KB
testcase_62 WA -
testcase_63 AC 74 ms
75,600 KB
testcase_64 AC 77 ms
75,696 KB
testcase_65 WA -
testcase_66 AC 74 ms
75,496 KB
testcase_67 WA -
testcase_68 AC 72 ms
71,068 KB
testcase_69 WA -
testcase_70 WA -
testcase_71 AC 74 ms
75,560 KB
testcase_72 WA -
testcase_73 AC 75 ms
75,792 KB
testcase_74 AC 74 ms
75,748 KB
testcase_75 WA -
testcase_76 AC 71 ms
70,892 KB
testcase_77 AC 74 ms
75,488 KB
testcase_78 WA -
testcase_79 WA -
testcase_80 WA -
testcase_81 WA -
testcase_82 WA -
testcase_83 WA -
testcase_84 WA -
testcase_85 WA -
testcase_86 WA -
testcase_87 WA -
testcase_88 AC 73 ms
75,720 KB
testcase_89 AC 76 ms
75,620 KB
testcase_90 WA -
testcase_91 AC 79 ms
75,364 KB
testcase_92 WA -
testcase_93 AC 70 ms
71,244 KB
testcase_94 WA -
testcase_95 AC 74 ms
75,768 KB
testcase_96 WA -
testcase_97 AC 73 ms
71,200 KB
testcase_98 WA -
testcase_99 WA -
testcase_100 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

def ans(A,B):
    if abs(A)+abs(B) > 5000: return
    cA,wB = "c"*abs(A),"w"*abs(B)
    if A >= 0 and B >= 0:
        return cA+wB+"C"*(A+B-1)
    if A >= 0:
        B = -B
        return wB+cA+"C"*(A-1)+"W"*(-B)
    if B >= 0:
        return cA+wB+"C"*(B-1)+"W"*(-A)

x,y,z = map(int,input().split())
if z==0:
    print("ccW")
    exit()

for A in range(-5000,5001):
    v = z-A*x
    if y and v%y: continue
    if y==0 and v: continue
    if y: B = v//y
    else: B = 0
    s = ans(A,B)
    if s:
        print(s)
        exit()
print("No")
0