結果
| 問題 | No.438 Cwwプログラミング入門 |
| コンテスト | |
| ユーザー |
hanorver
|
| 提出日時 | 2016-10-29 15:15:06 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 32 ms / 2,000 ms |
| + 842µs | |
| コード長 | 477 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2026-10-06 14:52:45 |
| 合計ジャッジ時間 | 7,224 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 98 |
コンパイルメッセージ
Main.py:17: SyntaxWarning: invalid decimal literal if v>=0and w>=0:
ソースコード
p=print
def f(g):p(g,end="")
from math import *
x,y,z=map(int,input().split())
v=w=t=6000;h=abs;r=range
if z==0:p("ccW");exit()
for a in r(-v,v):
b=z-a*x
if y:b//=y
if (a!=0 or b!=0)and a*x+b*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:f("cw"[s])
for i in r(q):f("wc"[s])
for i in r(q-1):f("C")
if v>=0and w>=0:
for i in l:f("C")
else:
for i in r(h([v,w][w<0])):f("W")
p()
hanorver