結果
| 問題 |
No.920 あかあお
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-08 21:52:09 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 373 bytes |
| コンパイル時間 | 4,228 ms |
| コンパイル使用メモリ | 65,796 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-23 03:38:31 |
| 合計ジャッジ時間 | 4,794 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
ソースコード
import sequtils, strutils
var
x: seq[int] = stdin.readline.split.map(parseInt)
ans: int = 0
if x[0] == 0 and x[2] > 0:
x[0].inc
x[2].dec
if x[1] == 0 and x[2] > 0:
x[1].inc
x[2].dec
while x[0] > 0 and x[1] > 0:
x[0].dec
x[1].dec
ans.inc
if x[0] == 0 and x[2] > 0:
x[0].inc
x[2].dec
if x[1] == 0 and x[2] > 0:
x[1].inc
x[2].dec
echo ans