結果

問題 No.438 Cwwプログラミング入門
ユーザー nebukuro09nebukuro09
提出日時 2016-10-29 01:09:01
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 971 bytes
コンパイル時間 1,601 ms
コンパイル使用メモリ 77,088 KB
実行使用メモリ 84,184 KB
最終ジャッジ日時 2023-08-16 10:33:33
合計ジャッジ時間 40,839 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
78,812 KB
testcase_01 AC 93 ms
78,720 KB
testcase_02 AC 654 ms
78,892 KB
testcase_03 AC 656 ms
78,732 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 655 ms
78,912 KB
testcase_07 AC 656 ms
78,944 KB
testcase_08 AC 98 ms
78,796 KB
testcase_09 AC 81 ms
78,268 KB
testcase_10 AC 157 ms
78,812 KB
testcase_11 AC 154 ms
78,740 KB
testcase_12 AC 113 ms
78,928 KB
testcase_13 AC 657 ms
78,932 KB
testcase_14 AC 100 ms
79,152 KB
testcase_15 AC 653 ms
78,748 KB
testcase_16 AC 88 ms
78,676 KB
testcase_17 AC 110 ms
78,868 KB
testcase_18 AC 657 ms
78,908 KB
testcase_19 AC 659 ms
78,772 KB
testcase_20 AC 90 ms
78,844 KB
testcase_21 AC 93 ms
78,480 KB
testcase_22 AC 158 ms
79,012 KB
testcase_23 AC 145 ms
78,668 KB
testcase_24 AC 653 ms
78,968 KB
testcase_25 AC 89 ms
78,768 KB
testcase_26 AC 116 ms
78,720 KB
testcase_27 AC 656 ms
78,712 KB
testcase_28 AC 74 ms
76,248 KB
testcase_29 AC 132 ms
78,856 KB
testcase_30 AC 653 ms
78,704 KB
testcase_31 AC 116 ms
78,868 KB
testcase_32 AC 131 ms
78,712 KB
testcase_33 AC 104 ms
78,852 KB
testcase_34 AC 140 ms
78,672 KB
testcase_35 AC 95 ms
78,744 KB
testcase_36 AC 95 ms
78,468 KB
testcase_37 AC 99 ms
78,656 KB
testcase_38 AC 654 ms
79,136 KB
testcase_39 AC 92 ms
78,908 KB
testcase_40 AC 651 ms
78,672 KB
testcase_41 AC 87 ms
78,452 KB
testcase_42 AC 111 ms
78,932 KB
testcase_43 AC 584 ms
78,408 KB
testcase_44 AC 87 ms
78,752 KB
testcase_45 AC 88 ms
78,860 KB
testcase_46 AC 95 ms
78,908 KB
testcase_47 AC 117 ms
78,712 KB
testcase_48 AC 434 ms
78,960 KB
testcase_49 AC 230 ms
78,876 KB
testcase_50 AC 661 ms
78,908 KB
testcase_51 AC 647 ms
79,176 KB
testcase_52 AC 120 ms
78,752 KB
testcase_53 AC 349 ms
79,152 KB
testcase_54 AC 663 ms
79,024 KB
testcase_55 AC 132 ms
78,912 KB
testcase_56 AC 176 ms
78,700 KB
testcase_57 AC 315 ms
78,552 KB
testcase_58 AC 663 ms
78,928 KB
testcase_59 AC 97 ms
78,776 KB
testcase_60 AC 197 ms
78,704 KB
testcase_61 AC 82 ms
78,208 KB
testcase_62 AC 661 ms
78,532 KB
testcase_63 AC 120 ms
78,708 KB
testcase_64 AC 129 ms
78,948 KB
testcase_65 AC 661 ms
78,928 KB
testcase_66 AC 121 ms
78,920 KB
testcase_67 AC 662 ms
78,972 KB
testcase_68 WA -
testcase_69 AC 190 ms
78,760 KB
testcase_70 AC 252 ms
78,940 KB
testcase_71 AC 273 ms
78,924 KB
testcase_72 AC 177 ms
78,712 KB
testcase_73 AC 273 ms
79,084 KB
testcase_74 AC 313 ms
78,728 KB
testcase_75 AC 185 ms
78,712 KB
testcase_76 WA -
testcase_77 AC 302 ms
78,660 KB
testcase_78 AC 662 ms
78,836 KB
testcase_79 AC 660 ms
78,932 KB
testcase_80 AC 666 ms
78,724 KB
testcase_81 AC 660 ms
78,708 KB
testcase_82 AC 661 ms
78,836 KB
testcase_83 AC 662 ms
78,996 KB
testcase_84 AC 658 ms
78,912 KB
testcase_85 AC 656 ms
78,776 KB
testcase_86 AC 659 ms
78,924 KB
testcase_87 AC 660 ms
78,536 KB
testcase_88 AC 130 ms
78,856 KB
testcase_89 AC 322 ms
78,688 KB
testcase_90 WA -
testcase_91 AC 137 ms
78,832 KB
testcase_92 WA -
testcase_93 WA -
testcase_94 AC 155 ms
78,704 KB
testcase_95 WA -
testcase_96 WA -
testcase_97 WA -
testcase_98 AC 663 ms
78,668 KB
testcase_99 AC 666 ms
78,532 KB
testcase_100 AC 436 ms
78,928 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

x, y, z = map(int, raw_input().split())

def print_ans(a, b, w):
    if a >= 0 and b <= 0:
        print ('w'*abs(b) + 'c'*abs(a) + 'C'*(abs(a)-1) + 'W'*abs(b))*w+'C'*(w-1)
    elif a <= 0 and b >= 0:
        print ('c'*abs(a) + 'w'*abs(b) + 'C'*(abs(b)-1) + 'W'*abs(a))*w+'C'*(w-1)
    else:
        print ('c'*(abs(a)-1) + 'w'*abs(b) + 'C'*(abs(a)+abs(b)-1))*w+'C'*(w-1)

for a in xrange(-5000, 5000):
    for b in xrange(-5000+abs(a), 5000-abs(a)):
        c = a*x+b*y
        if z == c == 0 and 2*(abs(a)+abs(b))-1 <= 10000:
            print_ans(a, b, 1)
            exit()
        if c > 0 and z % c == 0:
            if a != 0 or b != 0:
                w = z/c
                if (a<=0 or b <=0):
                    length = (2*(abs(a)+abs(b))-1)*w+w-1
                else:
                    length = (2*abs(a)+abs(b)-2)+w+w-1
                if length <= 10000:
                    print_ans(a, b, z/c)
                    exit()
print 'mourennaihasimasenn'
0