結果
| 問題 |
No.438 Cwwプログラミング入門
|
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-10-29 14:44:31 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 525 bytes |
| コンパイル時間 | 270 ms |
| コンパイル使用メモリ | 12,800 KB |
| 実行使用メモリ | 11,136 KB |
| 最終ジャッジ日時 | 2024-11-24 23:09:09 |
| 合計ジャッジ時間 | 13,634 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 44 WA * 54 |
ソースコード
from math import *
x,y,z=map(int,input().split())
v=w=t=6000;h=abs;r=range;p=print
if z==0:p("ccW");exit()
for a in r(-6000,6000):
b=(z-a*x)
if y:b//=y
if (a!=0 or b!=0)and a*x+e*y==z and h(a)+h(b)<t:t=h(a)+h(b);v=a;w=b
if t+t-1>10000:p("mourennaihasimasenn")
else:
s=v>0;l=r(h([v,w][s]));q=h([w,v][s])
for i in l:p("cw"[s],end="")
for i in r(q):p("wc"[s],end="")
for i in r(q-1):p("C",end="")
if v<0:
for i in r(h(v)):p("W",end="")
elif w<0:
for i in r(h(w)):p("W",end="")
else:
for i in l:p("C",end="")
p()
hanorver