結果

問題 No.438 Cwwプログラミング入門
ユーザー nebukuro09nebukuro09
提出日時 2016-10-29 01:09:01
言語 PyPy2
(7.3.15)
結果
WA  
実行時間 -
コード長 971 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 76,448 KB
実行使用メモリ 83,552 KB
最終ジャッジ日時 2024-05-03 19:11:41
合計ジャッジ時間 34,910 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
76,824 KB
testcase_01 AC 85 ms
76,580 KB
testcase_02 AC 593 ms
77,728 KB
testcase_03 AC 590 ms
77,856 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 594 ms
77,704 KB
testcase_07 AC 606 ms
77,600 KB
testcase_08 AC 87 ms
78,088 KB
testcase_09 AC 71 ms
76,680 KB
testcase_10 AC 144 ms
77,588 KB
testcase_11 AC 138 ms
77,988 KB
testcase_12 AC 102 ms
77,096 KB
testcase_13 AC 612 ms
77,472 KB
testcase_14 AC 92 ms
77,992 KB
testcase_15 AC 599 ms
77,828 KB
testcase_16 AC 81 ms
77,708 KB
testcase_17 AC 101 ms
77,868 KB
testcase_18 AC 618 ms
77,576 KB
testcase_19 AC 598 ms
77,692 KB
testcase_20 AC 83 ms
78,124 KB
testcase_21 AC 85 ms
77,972 KB
testcase_22 AC 149 ms
77,748 KB
testcase_23 AC 132 ms
77,828 KB
testcase_24 AC 591 ms
77,608 KB
testcase_25 AC 83 ms
78,120 KB
testcase_26 AC 107 ms
77,604 KB
testcase_27 AC 602 ms
77,444 KB
testcase_28 AC 70 ms
75,428 KB
testcase_29 AC 120 ms
76,792 KB
testcase_30 AC 582 ms
77,860 KB
testcase_31 AC 102 ms
76,552 KB
testcase_32 AC 116 ms
76,948 KB
testcase_33 AC 98 ms
76,728 KB
testcase_34 AC 132 ms
76,560 KB
testcase_35 AC 89 ms
77,864 KB
testcase_36 AC 83 ms
76,920 KB
testcase_37 AC 94 ms
77,600 KB
testcase_38 AC 593 ms
77,344 KB
testcase_39 AC 85 ms
77,088 KB
testcase_40 AC 582 ms
77,576 KB
testcase_41 AC 79 ms
76,712 KB
testcase_42 AC 99 ms
76,816 KB
testcase_43 AC 506 ms
77,600 KB
testcase_44 AC 81 ms
76,576 KB
testcase_45 AC 80 ms
76,556 KB
testcase_46 AC 86 ms
76,948 KB
testcase_47 AC 104 ms
76,940 KB
testcase_48 AC 384 ms
78,128 KB
testcase_49 AC 215 ms
77,608 KB
testcase_50 AC 591 ms
77,576 KB
testcase_51 AC 580 ms
77,592 KB
testcase_52 AC 107 ms
77,852 KB
testcase_53 AC 313 ms
77,732 KB
testcase_54 AC 593 ms
77,628 KB
testcase_55 AC 120 ms
77,872 KB
testcase_56 AC 163 ms
77,732 KB
testcase_57 AC 287 ms
77,700 KB
testcase_58 AC 595 ms
77,584 KB
testcase_59 AC 87 ms
78,072 KB
testcase_60 AC 177 ms
77,344 KB
testcase_61 AC 68 ms
76,580 KB
testcase_62 AC 589 ms
77,560 KB
testcase_63 AC 107 ms
77,728 KB
testcase_64 AC 117 ms
77,472 KB
testcase_65 AC 589 ms
77,344 KB
testcase_66 AC 109 ms
76,964 KB
testcase_67 AC 593 ms
77,608 KB
testcase_68 WA -
testcase_69 AC 168 ms
76,808 KB
testcase_70 AC 224 ms
76,992 KB
testcase_71 AC 242 ms
76,952 KB
testcase_72 AC 162 ms
76,984 KB
testcase_73 AC 242 ms
76,576 KB
testcase_74 AC 275 ms
76,988 KB
testcase_75 AC 163 ms
76,736 KB
testcase_76 WA -
testcase_77 AC 269 ms
77,076 KB
testcase_78 AC 584 ms
77,472 KB
testcase_79 AC 607 ms
77,456 KB
testcase_80 AC 602 ms
77,432 KB
testcase_81 AC 592 ms
77,472 KB
testcase_82 AC 612 ms
77,616 KB
testcase_83 AC 645 ms
77,376 KB
testcase_84 AC 634 ms
77,344 KB
testcase_85 AC 625 ms
77,728 KB
testcase_86 AC 608 ms
77,472 KB
testcase_87 AC 624 ms
77,612 KB
testcase_88 AC 125 ms
78,112 KB
testcase_89 AC 295 ms
77,580 KB
testcase_90 WA -
testcase_91 AC 126 ms
78,244 KB
testcase_92 WA -
testcase_93 WA -
testcase_94 AC 142 ms
77,080 KB
testcase_95 WA -
testcase_96 WA -
testcase_97 WA -
testcase_98 AC 613 ms
77,576 KB
testcase_99 AC 607 ms
77,612 KB
testcase_100 AC 385 ms
77,564 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