結果
| 問題 | No.346 チワワ数え上げ問題 |
| コンテスト | |
| ユーザー |
jj
|
| 提出日時 | 2016-08-11 21:36:23 |
| 言語 | Fortran (gFortran 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 1,198 ms |
| コンパイル使用メモリ | 30,208 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-07 11:05:10 |
| 合計ジャッジ時間 | 1,167 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 9 |
ソースコード
program main
implicit none
integer::N,w,nw,i,comb,total
character*100000::S
read *,S
nw = -1
comb = 0
total = 0
do i=LEN_TRIM(S),1,-1
if(S(i:i).eq.'w') then
nw = nw + 1
comb = comb + nw
else if(S(i:i).eq.'c') then
total = total + comb
end if
end do
print '(i0)', total
end program main
jj